<s>[INST] If $xy$ divides $x^2 + y^2$ show that $x=\pm y$ 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 ...
 [/INST] Rational Algebraic Integer Approach
Suppose that
$$
\frac{x^2+y^2}{xy}=\frac xy+\frac yx\in\mathbb{Z}\tag1
$$
Note that if $q=\frac xy\in\mathbb{Q}$ and $q+\frac1q=n\in\mathbb{Z}$, then
$$
\left(q-\frac1q\right)^2=n^2-4\in\mathbb{Z}\tag2
$$
This means that $z=q-\frac1q$ is a rational solution to $z^2-(n^2-4)=0$; that is, $z$ is a rational algebraic integer. Thus, $z\in\mathbb{Z}$ (see this answer). Therefore, $(n+z)(n-z)=4$ is an integer factorization of $4$ where both factors have the same parity. That is, $n+z=n-z=\pm2$, which means $n=\pm2$ and $q-\frac1q=z=0$. Thus, $\frac{x^2}{y^2}=q^2=1$, and therefore, $x=\pm y$.

Bezout Approach
Let $d=(x,y)$ and $u=x/d$ and $v=y/d$. Then, there exist $a,b$ so that $au+bv=1$. Suppose that
$$
\begin{align}
n
&=\frac{x^2+y^2}{xy}\\
&=\frac{u^2+v^2}{uv}\\
&=\frac{b^2u^2+(1-au)^2}{bu(1-au)}\\
&=\frac{\left(a^2+b^2\right)u^2-2au+1}{bu-abu^2}\tag3
\end{align}
$$
Then
$$
\frac1u=n(b-abu)+2a-\left(a^2+b^2\right)u\in\mathbb{Z}\tag4
$$
Thus, $u\cdot\frac1u=1$ is an integral factorization of $1$. That is, $u=\pm1$. Similarly, $v=\pm1$.
Therefore, $x=\pm d$ and $y=\pm d$, which means that $x=\pm y$.
</s>