I want to proof that
$\mbox p \in \overline A \iff d(p, A)= \inf\{d(p,a):a\in A\}=0$
My attempt for the first implication is as follows. We know that $\overline A= A \cup A'$, it would suffice to prove that for $a \in A$ or $a \in A'$ ($a$ is a limit point) the proposition is fulfilled; let's see for the accumulation point, for the other case I suppose it is analogous.
let $a \in A'$, note that $d(p, a)\geq 0$ let's see that strict inequality is not held.
Let $d(p, a) >0$, take $0<r<d(p, A)$ note that $a \notin B(p; r)$ because $d(p, a)\geq r$ for any $a \in A$, so $B(p; r)-\left\lbrace p \right\rbrace \cap A =\emptyset$, i.e. p is not an accumulation point, but this is a contradiction so that $d(p, a) =0$.
Now, I don't really know how to make the other implication. Any suggestions? any help is appreciated.