Let $n = s^2m$ for some $s, m \in \mathbb{Z}$, where $m$ is square free. Suppose that each prime factor $p \equiv 3 \pmod 4$ occurs to an even power in the prime factorization of $n$.
Since for each prime factor $p$ of $n$ such that $p \equiv 3\pmod 4, p$ occurs to an even power, $p \nmid m$. Thus each prime $p_0>2$ that divides $m$ satisfies $p_0 \equiv 1\pmod 4$, so by this property, each $p_0>2$ can be written as the sum of two squares. We know that $2$ can be written as the sum of two squares: $2=1^2+1^2$. By this property, the product of integers that can be written as the sum of two squares, $m$, can also be written as the sum of two squares. Thus $m=x^2+y^2$ for some $x, y \in \mathbb{Z}$. We can now express
$$n = s^2\left(x^2+y^2\right)=(s x)^2+(s y)^2,$$
so $n$ is the sum of two squares.
Suppose that $n=x^2+y^2$. If $m=1$, then $n=s^2$, so each prime $p$ in the factorization of $n$ such that $p \equiv 3\pmod 4$ occurs to an even power. Now, assume $m>1$. We will show that for every odd prime $p$ such that $p \mid m, p \equiv 1\pmod 4$. Observe that $x, y$ can be written as follows: $x=d x_1$ and $y=d x_2$, where $x_1, x_2$ are relatively prime and $d=\gcd(x, y)$. Then we have that:
$$\begin{aligned}
n & =d^2\left(x_1^2+x_2^2\right) \\
\frac{n}{d^2} & =x_1^2+x_2^2 \\
\frac{s^2 m}{d^2} & =x_1^2+x_2^2.
\end{aligned}$$
Since $m$ is square free, $d^2 \mid s^2$, with $s^2=t \cdot d^2$ for some $t \in \mathbb{Z}$, so
$$
t m=x_1^2+x_2^2 .
$$
Then, we know that $p \mid m$, so $p \mid t m=x_1^2+x_2^2$. Thus we have the congruence $x_1^2+x_2^2 \equiv 0\pmod p$, so $x_1^2 \equiv-x_2^2\pmod p$. We will show that $p \equiv 1\pmod 4$.
Suppose for the sake of contradiction that $p = 4k + 3$ for $k \in \mathbb{Z}$. Then notice that $p-1=4 k+2=2(2 k+1)$, so we have:
$$\begin{aligned}
x_1^2 & \equiv-x_2^2\pmod p \\
\left(x_1^2\right)^{2 k+1} & \equiv(-1)^{2k + 1}\left(-x_2^2\right)^{2k + 1}\pmod p \\
x_1^{p - 1} & \equiv-x_2^{p-1}\pmod p.
\end{aligned}
$$
Now, notice first that since $x_1, x_2$ are relatively prime, $p$ cannot divide both $x_1$ and $x_2$. Suppose $p \mid x_1$. Then $p \mid x_1^2$. We know that $p \mid t m$, so $p \mid t m-x_1^2=x_2^2$. Since $p$ is prime, $p \mid x_2$, contradicting $\operatorname{gcd}\left(x_1, x_2\right)=1$. Thus $p \nmid x_1$ and $p \nmid x_2$. Applying FLT, we have $x_1^{p-1} \equiv x_2^{p-1} \equiv 1\pmod p$, so we get that $1 \equiv - 1\pmod p$, contradicting $p>2$. Thus, $p \equiv 1\pmod 4$.