Find all pair of primes $(p,q)$ such that both $p^2+q^3$ and $p^3+q^2$ are perfect squares. Let
$p^2+q^3=a^2$ and  $p^3+q^2=b^2$. Let's suppose $ p \neq q$. When one of $p,q$ equals $2$, it yields system of equations with no solution, so $p,q \geq 3$.
Since any two primes numbers are coprime, then all $a,b,p,q$ are coprime.
$$(a-p)(a+p)=q^3$$
$$(b-q)(b+q)=p^3$$
$a \pm p$ does not divide $q$, and $b \pm q$ doesn't divide $p$ (if any of those are not equal to $1$). WLOG let's assume that $b-q\neq1$, then:
$$ 
\begin{cases}
b+q=p^2\\
b-q=p
\end{cases}$$
From this, it concludes that $$b^2=(p+q)^2=p^3+q^2\Rightarrow p^2+2pq+q^2=p^3+q^2 \Rightarrow p\frac{p-1}{2}=q $$ It's a contradiction with primality of $q$. When $\frac{p-1}{2}=1$, then $p=q$ - also contradiction.
The case when both $a-p$ and $b-q$ are equal $1$:
$$a-b=p-q=q^3-p-p^3+q$$
$$2(p-q)=(q-p)(q^2+qp+p^2)$$
$$-2=q^2+qp+p^2<0$$
Contradiction!
Now let's check the problem under condition $p=q$.
$$(a-p)(a+p)=p^3$$
$a+p$ is bigger than $p$, and $a-p$ is bigger than $1$, so
$$ \begin{cases}
a+p=p^2\\
a-p=p
\end{cases}
\Rightarrow p^2-p=2p \Rightarrow p(p-3)=0$$
The only solution pair is $(3,3)$
Is my solution correct?
 A: Your proof is way more complex than it needs to be. No need to first treat $2$ as a special case. No need to assume $p\ne q$ and arrive at contradictions.
$p^3+q^2=a^2 \Rightarrow (a-q)(a+q)=p^3$. Plainly $(a-q)\text{ and }(a+q)$ are factors of $p^3$ and multiply to $p^3$. Since $p$ is prime, the only factors of $p^3$ are $\{1,p,p^2,p^3\}$.
Case 1: $a-q=1,\ a+q=p^3$. Then $a=q+1 \Rightarrow a^2=q^2+2q+1=p^3+q^2$ or $p^3=2q+1$. This leads to $q=\frac{p^3-1}{2}=\frac{(p-1)(p^2+p+1)}{2}$. Since $q$ is prime, this requires either $p-1=1$ or $\frac{p-1}{2}=1$. This forces $(p,q)=(2,\frac{7}{2})\text{ or }(3,13)$. The first pair does not consist only of integers. The second pair consists of primes and satisfies $p^3+q^2=27+169=196=14^2$. However, $13^3+3^2=2197+9=2206$ and is not the square of an integer. There is no Case 1 answer.
Case 2: $a-q=p,\ a+q=p^2$. Your reasoning here was good, but ran off track because you assumed unnecessarily that $p\ne q$. $$a^2=p^2+2pq+q^2=p^3+q^2 \Rightarrow p^3=p^2+2pq \\ \Rightarrow q=\frac{p^2-p}{2}=p\cdot \frac{p-1}{2}$$
Since $q$ is prime, this last result requires $q=p$ and $\frac{p-1}{2}=1 \Rightarrow p=3$. This turns out to be a valid solution: $3^3+3^2=27+9=36=6^2$
If you choose to analyze the other equation, $q^3+p^2=b^2$, the analysis is completely parallel and arrives at the same results.
