Problem statement : Let $x,y$ be integers, show that if $xy$ divides $x^2 + y^2$ then $x=\pm y.$
What I have tried:
I can reduce this to the case where $\gcd(x,y)=1$, since if $x$ and $y$ have a common factor, $d$ say, then $d^2$ divides through both $xy$ and $x^2 + y^2$
This then allows me to introduce another equation $1=ax+by$ for some $a, b.$
But I then get stuck ...
Suppose that $\gcd(x,y)=1$ and $(xy)\mid(x^2+y^2)$. Then $y^2\equiv0\pmod x$. If $1=ax+by$ then $by\equiv1\pmod x$ and so $1\equiv(by)^2=b^2y^2\equiv0\pmod x$. So $x=\pm1$. Likewise, $y=\pm1$.