Suppose that $ar\equiv b$ (mod $m$) and $br\equiv a$ (mod $m$) for some $r$. Show that $a^2\equiv b^2$ (mod $m$).
I've tried quite a few different things and I'm unable to get rid of terms with $r$ in it (if that is even necessary) to show that $a^2=b^2=mz$ for some integer $z$.
I know that $ar-b=mx$ and $br-a=my$ for integers $x,y$. I tried using different mod properties like sum, difference, and product to see if it helped, but didn't have any luck. I ended up with $(a^2-b^2)(r^2-1)=m^2xz=m(mxy)$, but this is was no help and just made things more complicated. Any hints are greatly appreciated. I know there is something obvious that I haven't considered and my mind is just stuck in a certain mode of thinking and I can't escape it at the moment.
$$a^2\equiv abr\equiv bar\equiv b^2\pmod m.$$