Here's a sketch:
If $Df(x,y)=0$ for all $(x,y)\in\mathbb{R}^2,$ then we're done. So, suppose instead that there exist $(a,b)$ so that $Df(a,b)\neq 0,$ and suppose, WLOG, that $D_1f(a,b)\neq 0.$ Use continuity of $D_1 f$ to get that it is non-zero over a neighborhood $U$ of $(a,b).$ Now, define $g(x,y)=(f(x,y),y)$ from $U$ to $\mathbb{R}^2.$ You can apply the inverse function theorem (check this) to get open sets $V$ containing $(a,b)$ and $W$ containing $g(a,b)$ so that $g:V\rightarrow W$ is a bijective with $C^1$ inverse. Since $W$ is open, you can find $t\neq b$ so that $(f(a,b),t)\in W.$ If we let $(c,d)=g^{-1}(f(a,b),t),$ then we can see that $$(f(a,b),t)=g(c,d)\neq g(a,b)=(f(a,b),b),$$ which implies that $(c,d)\neq (a,b).$ However, $$(f(a,b),t)=g(c,d)=(f(c,d),d),$$ so we must have that $f(c,d)=f(a,b)$. Thus, $f$ is not injective.