Tokarev S.I.

Find all such pairs of prime numbers $p$ and $q$ that $p^{3}-q^{5}=(p+q)^{2}$.
Let neither of the numbers $p, q$ be divisible by 3. If the remainders of $p$ and $q$ when divided by 3 are the same, then the left side is divisible by 3, but the right side is not; if these remainders are different, then the right side is divisible by 3, but the left side is not.

Let $p=3$. From the equation $27-q^{5}=(3+q)^{2}>0$ it follows that $q^{5}<27$. This is impossible.

Let, finally, $q=3$. Then $p^{3}-243=(p+3)^{2}, p\left(p^{2}-p-6\right)=252$. Therefore, $p$ is a prime divisor of the number 252, that is, 2, 3, or 7. Checking leaves only $p=7$.

## Answer

$p=7, q=3$.