Let $ (X,d) $ be a metric space and $ A \subseteq X $ be compact. Prove that for any $ y \in X $ there exists $ x \in A $ so that $d(y,x) = d(y,A)$ where $ d(x,y)=|x-y| $.
Since A is compact it is covered by finitely many balls of $X$.
So $ A \subseteq \bigcup_{j = 1}^N B(x,j)=B(x,N) .$
Let $y \in A$. Then $y \in B(x,N)$ and so $d(x,y) < N$.
And then I'm stuck on how to approach this problem.