Prove Theorem (8.7).
Let's remind ourselves of Converse of Sum of Two Squares Theorem (8.7).
Let $m = p_1 \times p_2 \times \ldots \times p_r × N^2$ where $p$’s are distinct primes. If $m$ can be expressed as sum of two squares then none of these primes $p_j$ satisfies $p_j \equiv 3 \pmod 4$ for $j= 1, \ldots , r$.
We arbitrarily choose a prime $p$ amongst the $p_j$.
We are assuming $m$ can be expressed as a sum of two squares, so for some natural numbers $a,b$ we have
$$ m= a^2 +b^2 = p_1 \times p_2 \times \ldots \times p_r \times N^2 $$
This means $p \mid a^2 + b^2$. That is
$$ a^2 + b^2 \equiv 0 \pmod p $$
Let $g=\gcd(a,b)$. This means that for some natural numbers we have $a = gx$ and $b = gy$, where $\gcd(x,y)=1$.
And so
$$ m = g^2(x^2 + b^2) = p_1 \times p_2 \times \ldots \times p_r \times N^2$$
This tells us $g^2 \mid N^2$. And so $\frac{N^2}{g^2}$ is a natural number.
$$ (x^2 + b^2) = p_1 \times p_2 \times \ldots \times p_r \times \frac{N^2}{g^2}$$
It also tells us $p \mid x^2 + y^2$, that is
$$ x^2 + y^2 \equiv 0 \pmod p $$
If $y \equiv 0 \pmod p$ then $x \equiv 0 \pmod p$. That is, for some natural numbers $x', y'$ we have $x=px'$ and $y=py'$. That would mean $\gcd(x,y) \ge p$, contradicting $\gcd(x,y)=1$. And so we can rule out $y\equiv 0 \pmod p$, a fact we'll use below.
The congruence $x^2 + y^2 \equiv 0 \pmod p$ can be written as
$$ x^2 \equiv - y^2 \pmod p $$
This has solutions if $p \not \mid -y^2$, which we have shown above, and the Legendre symbol $(\frac{-y^2}{p})=1$. Noting that $y=0$ is ruled out, we have
$$ (\frac{-y^2}{p}) = (\frac{-1}{p}) \times \underbrace{(\frac{y^2}{p})}_{=1 \text{ since } y \ne 0}= (\frac{-1}{p}) = 1 $$
By Proposition (7.11), $(\frac{-1}{p})= 1$ if an only if $p \equiv 1 \pmod 4$, proving the Theorem (8.7).