Your work seems right (although you could get the easier contradiction in the second case by adding $d(x,y)$), but there is an easier proof: Let $x,y,z$ be points in a metric space. Then

$$d(x,y)\leq d(x,z)+d(z,y).$$

Then,

$$d(x,y)-d(y,z)\leq d(x,z).$$

On the other hand,

$$d(y,z)\leq d(x,z)+d(x,y).$$

Then,

$$d(y,z)-d(x,y)\leq d(x,z).$$

Therefore,

$$|d(y,z)-d(x,y)|\leq d(x,z).$$


You don't really need to prove it by contradiction:

By the triangle inequality, $d(x,y)\le d(x,z)+d(z,y)=d(x,z)+d(y,z)$, whence $$d(x,y)-d(y,z)\le d(x,z.)$$ Similarly, $d(y,z)\le d(y,x)+d(x,z)$, whence $$d(y,z)-d(x,y)\le d(x,z),$$ and finally $$\bigl\lvert d(x,y)-d(y,z)\bigr\rvert=\max\bigl(d(x,y)-d(y,z),d(y,z)-d(x,y)\bigr)\le d(x,z).$$