3. Find all integers $x$ for which both numbers $(x-3)^{2}-2,(x-7)^{2}+1$ are prime numbers.
3. Both numbers 3 and 7 are odd, so for any integer $x$, the numbers $x-3$ and $x-7$ (and thus also the numbers $(x-3)^{2}$ and $(x-7)^{2}$) have the same parity. The numbers -2 and 1 have different parity, so the numbers $(x-3)^{2}-2$ and $(x-7)^{2}+1$ have different parity, meaning one of them is even. Since the only even prime number is 2, one of the numbers $(x-3)^{2}-2$ and $(x-7)^{2}+1$ must be equal to 2.

a) Suppose $(x-3)^{2}-2=2$. Then $(x-3)^{2}=4$, so $x=5$ or $x=1$. For $x=5$, the value of the expression $(x-7)^{2}+1$ is 5, which is a prime number, and for $x=1$, the value of this expression is 37, which is also a prime number.

b) Suppose $(x-7)^{2}+1=2$. Then $(x-7)^{2}=1$, so $x=8$ or $x=6$. For $x=8$, the value of the expression $(x-3)^{2}-2$ is 23, which is a prime number, and for $x=6$, the value of this expression is 7, which is also a prime number.

The sought integers $x$ are all elements of the set $\{1,5,6,8\}$.

For a complete solution, award 6 points. For the observation that the numbers have different parity, award 4 points, and for discussing each of the possibilities a) and b), award 1 point each.