Problem: Let $(X,d)$ be a metric space. Then show that for any $x,y,z\in X$ \[ \left\vert d(x,y) - d(y,z) \right\vert \leq d(x,z). \]
Solution: Given that $(X,d)$ is a metric space and hence we have the triangle inequality. For any $x,y,z$ we have \begin{align*} d(x,y) \leq d(x,z) + d(z,y) & \implies d(x,y) - d(z,y) \leq d(x,z). \end{align*} Since $d$ is a metric, so it is symmetric and hence we have \begin{equation}\label{eq:27Apr2023-1} d(x,y) - d(y,z) \leq d(x,z). \end{equation} Similarly, we have \[ d(z,y) \leq d(z,x) + d(x,y) \implies d(z,y) - d(x,y) \leq d(z,x). \] Using the symmetric, we obtained \begin{equation}\label{eq:27Apr2023-2} d(y,z) - d(x,y) \leq d(x,z). \end{equation} Using equations \eqref{eq:27Apr2023-1} and \eqref{eq:27Apr2023-2} we conclude that \[ \left\vert d(x,y) - d(y,z) \right\vert \leq d(x,z). \]