This has been asked heavily in the past, for instance here and here.
Let $x\in X$ and $\operatorname{dist}(x,A)=\inf\lbrace \rho(x,a): a\in A\rbrace$ for any nonempty subset $A$ of X.
It is a fact that if $A$ is compact, then there exists an $a\in A$ such that $\operatorname{dist}(x,A)=\rho(x,a)$.
If $X=\mathbb{R}^n$ and $A$ is closed, then the conclusion of $b$ holds.
I don't see quite well why I need $\mathbb{R}^n$ besides the obvious. If $A$ is also bounded, then $A$ is compact and there is nothing to prove. If $A$ is closed but unbounded, how can I prove the statement? I'm confused because closed subsets can be quite different. For instance I can choose $\mathbb{N}$, but also $\cup [0,a], a\geq0$. I think both are closed and unbounded, but one has a nonempty set of limit points while the other not.