1. Determine all pairs of prime numbers $p$ and $q$ for which

$$
p+q^{2}=q+p^{3} \text {. }
$$
1. We rearrange the equation to the form

$$
q(q-1)=p(p-1)(p+1)
$$

from which the inequality $p<q$ follows, and since $p+1>1$, it would be $p(p-1)(p+1)>q(q-1)$, and also that $q$ divides the product $p(p-1)(p+1)$. Since $q$ is a prime number, at least one of the relations $q|p, q|(p-1), q \mid(p+1)$ must hold. Given the conditions $p>1$, $q$ cannot divide $p$ or $p-1$, so $q \mid(p+1)$. Therefore, $q \leqq p+1$, and together with $p<q$ this gives $q=p+1$.

The only two prime numbers differing by 1 are 2 and 3. Thus, $p=2$ and $q=3$. By verification, we confirm that $2+3^2=3+2^3$ indeed holds.

Note. The inequality $p<q$ can also be proven by the following reasoning: Clearly, $p \neq q$. The prime numbers $p$ and $q$ are therefore coprime, and since $p \mid q(q-1)$, it must be $p \mid(q-1)$ and hence $p \leqq q-1$.

For a complete solution, award 6 points. Award 1 point for determining that $p<q$; 2 points for proving $q \mid(p+1)$ and another 2 points for $q=p+1$ and the resulting $p=2, q=3$. One point for verifying that the pair $p=2, q=3$ is indeed a solution.