Prove that $pq$ can be written as $x^2+y^2$ in two different ways I want to prove that if $p,q\in \mathbb{N}$ are primes and $p\neq q$, then $pq$ can be written as $x^2+y^2$ (with $x,y\in \mathbb{Z}_{>0}$) in two different ways, that is, $pq=a^2+b^2=c^2+d^2$ with $\{a,b\}\neq\{c,d\}$.
I know that if $p\in \mathbb{N}$ is prime, then $p$ can be written as $x^2+y^2$ in an unique way, because if I factorise in $\mathbb{Z}[i]$, $x^2+y^2=(x+iy)(x-iy)$ and $\mathbb{Z}[i]$ is a unique factorization domain.
I have tried using this to solve the original problem. I am guessing I should do something like
$$pq=(a+bi)(a-bi)(c+di)(c-di)$$
and then grouping the factors in two different ways. However I am stuck here. Can someone help me?

Your general statement is not correct. For instance, take $p=2,\thinspace q=3$ then you get
$$x^2+y^2=6$$
which implies $x,y\in\mathbb Z$ doesn't exist.

The correct statement can be considered as follows:
Let $p,q$ be distinct primes and $x,y,u,v\in\mathbb Z^{+}$ such that,
$$p=x^2+y^2,q=u^2+v^2;p,q\not\in\left\{2\right\}$$
then we have,
$$(x^2+y^2)(u^2+v^2)=(ux+vy)^2+(uy-vx)^2$$
and
$$(x^2+y^2)(u^2+v^2)=(ux-vy)^2+(uy+vx)^2$$
Note that, iff $p=2$ or $q=2$ then we have unique sum of squares:
$$(1^2+1^2)(u^2+v^2)=(u+v)^2+(u-v)^2.$$
I leave it to you to analyze why the numbers containing the sum of squares differ in the case of $p,q\not\in\left\{2\right\}$.
