Show for $x,y \in \mathbb{X} : |d_A (x) - d_A (y)| \leq d(x,y)$ For $A \subset \mathbb{X}$ non empty and $x \in \mathbb{X}$ define the distance of $x$ to $A$ by $$d_A (x) =  \inf \limits _{a \in A} d(x,a)$$
I am trying to show for $$x,y \in \mathbb{X} : |d_A (x) - d_A (y)| \leq d(x,y)$$
This is the proof I have.
I start with the triangle inequality: $$d(x,a) \leq d(x,y) + d(y,a)$$
I note $$d_A (x) = \inf \limits _{a \in A} d(x,a)$$ and $$d_A (y) = \inf \limits _{a \in A} d(y,a)$$
So the triangle inequality becomes $$d_A (x) \leq d(x,y) + d_A (y)$$
At this point it is obvious you rearrange to get the desired solution but that was marked as wrong and instead you change the role of $x$ and $y$. 
Why is rearranging wrong? 
And why do you have to change the roles of $x$ and $y$?

Expanding the modulus, what you want to show is equivalent to $-d(x,y) \le d_A (x) - d_A (y) \le d(x,y)$. By rearranging, you only get $d_A (x) - d_A (y) \le d(x,y)$, which is only half of what you want, and this explains why rearranging alone is not enough. Exchanging $x$ and $y$, though, will give you $d_A (y) - d_A (x) \le d(y,x)$ or, equivalently, $d_A (x) - d_A (y) \ge -d(y,x)$ which is easily seen to be the other half, and these two together are what you want to get.
