I am supposed to prove if the function $ f:X \to \mathbb {R}, f (x) = dist (x, A)$ where $ A$ is an arbitrary subset o the metric space $X $ is uniformly continuous.
If both points $ x $ and $ y $ are in the closure of $ A$ this is true since since the distance is constant 0 and is uniformly continuous.
If $ x \in \overline{A}$ and $ y \in \overline{A}^{c}$ then for $|dist (y, A)|<\epsilon$ we can take $\delta=\epsilon$ and it is again uniformly continuous.
However when both point are outside of $A$, I'm not sure of what to do. I started by defining $dist (x, A) = inf dist(x, a), $for $ a \in A$, but I haven't been able to bound the distance between the points in terms of this.
Any help is appreciated, thanks in advance.