I have come across the following comment in the lecture:
If for a prime $q$ holds $q \equiv 5 \pmod 8$, then $q-2$ has a prime factor $p$ with $p \equiv 3 \pmod 8$ or $p \equiv 5 \pmod 8$.
I do not see why this is true. I attempted to prove it by rewriting $q-2$ as $q-2 = 8k+3$ for some integer $k$ and tried to see what happens when I divide it by an arbitrary prime. However, this did not help. Could you please give me a hint?