Distance between a point to a set in metric spaces Let $(X, d)$ be any arbitrary metric space. Now fix $y \in X$ and define $d_y: X \rightarrow \mathbb{R}, d_y(x)= d(x,y)$. 

How can I prove that $d_y$ is continuous on $X$? (Given any fixed $y
 \in X$).

Also, let $A \subseteq X$ and fix $x \in X$, define $\rho(x, A) = \inf \{d(x,a) : a \in A \}$, 

Show that the closure of $A$ is $\overline{A}=\{x \in X: \rho(x, A)=0
 \}$

Finally, let $A \subseteq X$ be a compact subset of $X$. 

Prove that $\rho(x, A) = d(x, a)$ for some $a \in A$.

 A: Problem 1
Let $\varepsilon > 0$ be arbitrary, choose $\delta = \epsilon$, try to show that 
$$
d(x,z)<\delta\implies \lvert d_y(x) - d_y(z)\rvert < \varepsilon
$$
on your own.
Problem 2
Recall that the closure of $A$ is the union of $A$ and its limit points. This means that we need to show that if a point $x$ is a limit point of $A$, i.e. if there exists a sequence $(a_n)_n\subseteq A$ that converges to $x$, then $\rho(x,A) = 0$, and that if $\rho(x,A) = 0$, then we can find a sequence $(a_n)_n\subseteq A$ that converges to $x$. 
To show the first direction, show that you can always find some $a\in A$ that is arbitrarily close to $x$ by using the given sequence $(a_n)_n$ that converges to $x$. To show the second, use the definition of infimum to try to show the existence of $a\in A$ that are arbitrarily close to $x$. 
Problem 3
In metric spaces, compactness is the same as sequential compactness, meaning that every sequence in $A$ has a convergent subsequence that converges inside $A$. First show that you can construct a sequence $(a_n)_n\subseteq A$ so that $d(x,a_n)$ converges to $\rho(x,A)$. Then, show that this sequence $(a_n)_n$ is convergent (hint: compact spaces are complete). Finally, show that $a\in A$, the limit of $a_n$, satisfies $\rho(x,A) = d(x,a)$. 
Good luck!
