To show that $n^7 + 7 = x^2$ has no solution we shall use the fact that
$n^7 - 7 = x^2$ has one solution namely $n = 2$ and $x = 11$.
Suppose $n^7 + 7 = x^2$. Adding to $2^7 - 7 = 11^2$ we get
$
n^7 + 2^7 = x^2 + 11^2
$
Call $m = n + 2$. Then
$
n^7 + 2^7 = (m - 2)^7 + 2^7 =
$
$$\sum_{0 \le k \le 7} \binom{7}{k} m^k (-2)^{7-k} + 2^7$$
$$ = \sum_{1 \le k \le 7} \binom{7}{k}(-1)^{k-1} m^k (2)^{7-k} $$
$m$ can be factored out and you get
$$n^7 + 2^7 = m \sum_{1 \le k \le 7} \binom{7}{k} (-1)^{k-1} m^{k-1} (2)^{7-k}$$
Let's write $n^7 + 2^7 = m\cdot M.$
Note that $M = m^6 -7\cdot 2\cdot m^5 + - + -21\cdot 2^5m + 7\cdot 2^6$
Hence $\gcd(m,M)$ is a divisor of $7\cdot 2^6$
Note that in $\Bbb{Z}_4$, the squares are $0$ and $1$. Hence $n^7 + 7 = 0$ or $1$ in $\Bbb{Z}_4$, which implies that $n$ is odd.
This implies that $m$ is odd. Hence $\gcd(m,M)$ is either $1$ or $7$.
Observe that in $\Bbb{Z}_7$, the squares are $0,1,2,4$. Hence the sum of $2$ squares can be a multiple of $7$ only if both squares are themselves multiples of $7$. Since $11$ is not, $x^2 + 11^2$ can't be a multiple of $7$.
Therefore $\gcd(m,M)=1$
Now if $m \cdot M$ is a sum of $2$ squares, its square free part has prime factors only of the form $p = 4k + 1$.
Hence the same is true for m, since $\gcd(m,M) = 1$.
This implies that $m = 1 \pmod 4$ and $n = m - 2 = - 1 . \pmod 4$
Hence $n^7 + 7 = -1 -1 = 2 \pmod 4$ and is not a square.
This yields a contradiction: $n^7 + 7$ can't be a square.
Best Answer
In general, the contrapositive of a conditional:
'If P then Q'
is the statement:
'If not Q then not P'
Applied to your statement, we would thus get:
'If $n$ is a perfect square, then $n$ is not a positive integer such that $n \equiv 2 \pmod{4}$ or $n \equiv 3 \pmod{4}$'
... But somehow I doubt that's what they meant. In fact, the original statement was probably meant as:
'For any positive integer $n$, it holds that if $n \equiv 2 \pmod{4}$ or $n \equiv 3 \pmod{4}$, then $n$ is not a perfect square'
So then by taking the contrapositive of the contrapositive of the conditional that is part of that general statement about positive integers, we get:
'For any positive integer $n$, it holds that if $n$ is a perfect square, then it is not the case that $n \equiv 2 \pmod{4}$ or $n \equiv 3 \pmod{4}$'
...which makes a lot more sense.
Indeed, to prove this statement:
Take $n$ to be a positive integer and assume it is a perfect square. So, $n=k^2$ with $k$ an integer. $k$ is either even or odd. If $k$ is even, then $k=2m$ for some integer $m$, and so $n=(2m)^2=4m^2$. Hence, $n \equiv 0 \pmod{4}$. If $k$ is odd, then $k=2k+1$ for some integer $m$' and so $n=(2m+1)^2=4m^2+4m+1$, and hence $n \equiv 1 \pmod{4}$. So, it is not the case that $n \equiv 2 \pmod{4}$ or that $n \equiv 3 \pmod{4}$.