I need to prove that the function $ f: Z^+ \times Z^+ \rightarrow Z^+$ is injective. It's defined as $f(m,n) = \frac{(m+n-2)(m+n-1)}{2} + m$. I tried using $(a,b) \ne (c,d) \implies f(a,b) \ne f(c,d)$ and got
$a^2 + 2ab - a + b^2 - 3b = c^2 + 2cd - c + d^2 - 3d$.
Does anyone have an idea how to proceed?