Let $(M,d)$ be a metric space, $A\subset M$. Prove that $$f(x)=d(x,A)=\inf_{y\in A}d(x,y)$$ is continuous on $M$.
I have tried the following
Let $\epsilon>0$, $x_0\in M$. I have to find $\delta>0$ such that if $d(x,x_0)<\delta$, then $|f(x)-f(x_0)|<\epsilon$.
For that,
$$|f(x)-f(x_0)|<\epsilon\iff \big|\inf_{y\in A}d(x,y)-\inf_{y\in A}d(y,x_0)\big|<\epsilon \iff \big|\inf_{y\in A}\{d(x,y)-d(y,x_0)\}\big|<\epsilon$$ and I do not know how to continue.
Note: My teacher has not defined Lipschitz continuity.