Since you mentioned the use of Gaussian integers specifically: (and assuming that $a,b,c,d$ are supposed to be integers)
We define the norm on the ring of Gaussian integers as follows:
$$N: \mathbb{Z} + i\mathbb{Z} \to \mathbb{Z}: a + ib \mapsto (a+ib)(a - ib) = a^2 + b^2.$$
Since $x = a^2 + b^2$, we have that the element $a + ib$ has norm $x$. Analogously, the element $c + id$ has norm $y$. Now we have that $(a+ib)(c + id)$ is an element of the ring of Gaussian integers (by definition of a ring), hence there exists elements $e,f \in \mathbb{Z}$ such that
$$(a+ib)(c + id) = e + if$$
and hence their norms are equal. The norm is a multiplicative map, so we find that
$$xy = N(a+ib)N(c + id) = N((a+ib)(c + id)) = N(e + if) = e^2 + f^2.$$