A rule is one-to-one only if no two inputs share an output, so exhibit a collision for each non-answer.
(−1)2−1=12−1=0,∣1−2∣=∣3−2∣=1
So x2−1 repeats at ±1 and ∣x−2∣ repeats at 1 and 3, while the constant f(x)=5 sends every input to 5. Only the line 2x+1 never repeats an output, so only it is one-to-one on all reals.