Functions in a metric space. 
Question
Let $(X, d)$ be a metric space. For each $a \in X$, define a function $f_a\colon X \to \mathbb R$ by $f_a(x) = d(x, a), (x ∈ X)$.
Prove that for all $a, b \in X$
$$\sup\{|f_a(x) − f_b(x)| : x \in X\} = d(a,b).$$

I know I have to prove that d(a,b) is a least upper bound but I am unsure how to go about doing it.

we have by the triangle inequality
\[
  f_a(x) = d(x,a) \le d(a,b) + d(x,b) = d(a,b) + f_b(x) \iff f_a(x) - f_b(x) \le d(a,b)
\]
and
\[
  f_b(x) = d(x,b) \le d(a,b) + d(x,a) = d(a,b) + f_a(x) \iff f_b(x) - f_a(x) \le d(a,b)
\]
which together shows that $d(a,b)$ is an upper bound. But now $f_b(a) - f_a(a) = d(a,b)$, so it's attained and therefore the least upper bound, 
