I have a question which is based on the question here. The question reads:
Show that if A is compact, show that $d(x,A)= d(x,a)$ for some $a \in A$.
What if I change the question to
Show that if X is complete and $A \subset X$ is closed, show that $d(x,A)= d(x,a)$ for some $a \in A$.
I'm at a lost here. Can I get a hint? I can't seem to use to hints at the original post. My initial thoughts are to construct a sequence such that it converges to $inf\{d(x,a) | a \in A\}$. However, I need to show that the set $\{d(x,a)|a \in A\}$ contains its $inf$. I'm not sure how to proceed.