Fermat's theorem for sums of two rational squares 
Guess a necessary and sufficient condition that $x^2+y^2=p$ to have rational solutions.

I know  the answers are when $p=2$ and $p \equiv 1\bmod 4$. I don't understand why these are good guesses. So I can't prove my guess..
 A: Are you getting hung up on the "guess" part? If you already know the answer, why don't you just pretend to guess it? Or maybe you can even make a wrong guess, such that $2p + 1$ also needs to be prime, or that $p$ has to be someone's lucky number.
Or you can pretend to gradually approach the answer. Can $p$ be negative? Well, no, because $x^2 \geq 0$ even if $x < 0$, likewise for $y^2$. So if $p = -2$ or $-5$, there is no solution, but with 2 or 5 instead, there are solutions, of which I'm sure you've already found the one for 2 if not also the one for 5. So $p$ has to be positive. It's necessary but not sufficient.
What about the parity of $p$? Since $p$ has to be positive, $p = 2$ is the only even possibility. The others have to be odd. You already know that the sum of two odd numbers is even, and you also know that an even number plus an odd number is odd.
But that doesn't explain why we can do $2^2 + 1^2 = 5$ but we can't find an integral solution for $p = 3$. So maybe it has something to do with congruence modulo 4. Indeed we see that if we require $x$ to be even and $y$ to be odd (no loss of generality there), we have $x^2 \equiv 0 \pmod 4$ and $y^2 \equiv 1 \pmod 4$, even if $x \equiv 2 \pmod 4$ and $y \equiv 3 \pmod 4$.
Maybe this is enough for you to understand. If not, spend some time with ProofWiki: https://proofwiki.org/wiki/Fermat%27s_Two_Squares_Theorem
