Which properties must a function, $f$, fulfill for $d(x,y)=|f(x)-f(y)|$ to be a metric I have two questions I need to answer:

Let $\mathbb{X}$ be a set and $f : \mathbb{X}  \rightarrow \mathbb{R}$ a function. Define $$ d : \mathbb{X} \times \mathbb{X} \rightarrow \mathbb{R}, ~d(x,y) = |f(x) - f(y)| $$
  State which properties $f$ must fulfill in order for $d$ to be a metric, and prove that they are suffecient and necessary.

The only property I am certain that $f$ must have, is that $f$ must be injective. This is to ensures that $d(x,y) = 0 \Leftrightarrow x = y$. I'm having trouble finding out how to show that this must be true though and that you don't need anything else, but I assume that it simply involves showing that it injective functions also make $d$ fulfill all the other requirements for $d$ to be a metric (triangle inequality, non-negativity and symmetry). Non-negativity and symmetry is obvious since $d$ is the absolute value of the difference between $f(x)$ and $f(y)$. I assume that the triangle inequality is equally simple.

Given points $u, v, w, x$ in a metric space $(\mathbb{X}, d)$ prove that $$|d(u,v) - d(w, x)| \leq d(u, w)  + d(v, x)$$ Use this result to prove that for sequences $\{x_n\}$, $\{y_n\}$ in $\mathbb{X}$ with $\lim_{n\rightarrow \infty}x_n = x \in \mathbb{X}$, $\lim_{n\rightarrow \infty}y_n = y \in \mathbb{X}$ it holds $$\lim_{n\rightarrow \infty}d(x_n, y_n) = d(x, y)$$

I'm assuming this is bascially using the triangle inequality to show the first part.
What I'm really asking is for hints on how to formulate the proofs, not the proofs themselves.
 A: You’ve nearly answered the first question; all that remains is to verify the triangle inequality, which boils down to showing that for all $x,y,z\in\Bbb X$,
$$|f(x)-f(y)|\le|f(x)-f(z)|+|f(z)-f(y)|\,$$
which should be very straightforward. For the actual write-up, I suggest first proving that $d$ separates points iff $f$ is injective. If $f$ is injective, it’s clear that $d(x,y)=0$ iff $x=y$. If $f$ is not injective, suppose that $x$ and $y$ are distinct points of $\Bbb X$ such that $f(x)=f(y)$, and observe that in that case $d(x,y)=0$. Then just go ahead and prove that for any $f$ at all, $d$ has the other properties required of a metric. When you’ve done all that, you’ve exactly what’s required.
You’re right that the triangle inequality is used to show the first part of the second question; don’t forget to consider both possibilities, $d(u,v)\le d(w,x)$ and $d(w,x)\le d(u,v)$. Write that up as a separate argument, so that you can simply appeal to the result when you get to the second part. 
For the second part, you want to proceed as for most any proof requiring that you show that some point is the limit of some sequence: let $\epsilon>0$ be arbitrary, and show that you can find an $m_\epsilon\in\Bbb N$ such that 
$$|d(x_n,y_n)-d(x,y)|<\epsilon\tag{1}$$
whenever $n\ge m_\epsilon$. You can apply the first part directly here, using what you know about the sequences $\langle x_n:n\in\Bbb N\rangle$ and $\langle y_n:n\in\Bbb N\rangle$.
A: For the first question you can try to apply the triangle inequality for real numbers to $f(x)-f(z)$ and $f(z)-f(y)$ (i.e. for real numbers $|a+b|\le |a|+|b|$).
For the second question, first assume that $d(u,v)\ge d(w,x)$, such that you can remove the absolute value, and the statement you want to prove is then $d(u,v)\le d(u,w)+d(w,x)+d(v,x)$, which is the triangle inequality applied twice. For $d(u,v)<d(w,x)$ you will instead have to replace the absolute value by a minus sign, and then you can do something similar as in the first case. To prove the part about the limit, try to use the result for $|d(x_n,y_n)-d(x,y)|$.
