This is the full question
Let $P$ be an odd prime. Prove that if there is an integer $x$ such that,
$$ p\mid x^2+1 \text{ then } p \equiv 1 \pmod 4 $$
$$ p\mid x^2-2 \text{ then } p \equiv 1 \text{ or } 7\pmod 8 $$
$$ p\mid x^2+2 \text{ then } p \equiv 1 \text{ or } 3\pmod 8 $$
$$ p\mid x^4+1 \text{ then } p \equiv 1 \pmod 8 $$
Show that there are infinitely many primes of each of the forms $8n+1,8n+3,8n+5,8n+7$
I was able to show all the above four relations, but i don't understand how these imply that there are infintely many such primes.