Problem: Find all pairs of primes $(p, q)$ for which $p-q$ and $pq-q$ are both perfect squares.

Solution: The answer is $(3,2)$ only.
This obviously works so we focus on showing it is the only one.

\paragraph{Approach using difference of squares (from author).}
Set
\begin{align*}
  a^2 &= p-q \\
  b^2 &= pq-q.
\end{align*}
Note that $0 < a < p$, and $0 < b < p$ (because $q \le p$).
Now subtracting gives
\[ \underbrace{(b-a)}_{<p} \underbrace{(b+a)}_{<2p} = b^2-a^2 = p(q-1) \]
The inequalities above now force $b+a = p$.
Hence $q-1 = b-a$.

This means $p$ and $q-1$ have the same parity,
which can only occur if $q = 2$.
Finally, taking mod $3$ shows $p \equiv 0 \pmod 3$.
So $(3,2)$ is the only possibility (and it does work).

\paragraph{Divisibility approach (Aharshi Roy).}
Since $pq-q = q(p-1)$ is a square, it follows that $q$ divides $p-1$
and that $\frac{p-1}{q}$ is a perfect square too.
Hence the number
\[ s^2 \coloneq (p-q) \cdot \frac{p-1}{q} = \frac{p^2-qp-p+q}{q} \]
is also a perfect square.
Rewriting this equation gives
\[ q = \frac{p^2-p}{s^2 + (p-1)}. \]
In particular, $s^2 + (p-1)$ divides $p^2-p$, and in particular $s \leq p$.
We consider two cases:
\begin{itemize}
  \ii If $s^2+(p-1)$ is not divisible by $p$, then it must divide $p-1$,
  which can only happen if $s^2 = 0$, or $p = q$.
  However, it's easy to check there are no solutions in this case.

  \ii Otherwise, we should have $s^2 \equiv 1 \pmod p$,
  so either $s = 1$ or $s = p-1$.
  If $s = p-1$ we get $q=1$ which is absurd.
  On the other hand, if $s=1$ we conclude $q = p-1$ and hence $q=2$, $p=3$.
\end{itemize}