Find all primes $(p,q)$ such that $pq$ divides $p^3 + q^3 +1$ The question is

Find all primes $(p,q)$ such that $pq$ divides $p^3 + q^3 +1$.

My attempt:
This reduces to finding primes $p,q$ such that p divides $q^3+1=(q+1)(q^2-q+1)$ and q divides $p^3+1=(p+1)(p^2-p+1)$.
Now we have 4 cases: If p divides $q+1$ and q divides $p+1$, then $\{p,q\}=\{2,3\}$.
I don't know how to deal with the other cases. For example, what happens if p divides $q+1$ and q divides $p^2-p+1$?

$Solution\ :$
\begin{gather}
So,\ given \notag\\
p^{3} +q^{3} +1\ \equiv 0\bmod pq \notag\\
And\ we\ know\ that, \notag\\
( a+b+c)^{3} -a^{3} -b^{3} -c^{3} =3\cdotp ( a+b)( b+c)( c+a) \notag\\
 \notag\\
So,\ a^{3} +b^{3} +c^{3} =( a+b+c)^{3} -3\ ( a+b) \ ( b+c) \ ( c+a) \notag\\
 \notag\\
\therefore p^{3} +q^{3} +1\ \equiv 0\bmod pq \notag\\
\Longrightarrow ( p+q+1)^{3} -3\ ( p+1)( q+1)( p+q) \equiv 0\bmod pq\ ....(1)\\
 \notag\\
So,\ p^{3} +q^{3} \ can\ be\ written\ as\ ( p+q)\left( p^{2} -pq+q^{2}\right) \notag\\
In\ the\ modulo\ form,\ ( p+q)\left( p^{2} -pq+q^{2}\right) +1\equiv 0\bmod pq \notag\\
And\ ( p+q)\left( p^{2} -pq+q^{2}\right) \equiv -1\bmod pq\ ....(2)\\
 \notag\\
So\ we\ have\ four\ cases,\  \notag\\
Case\ I\ :\ ( p+q) \equiv -1\bmod pq \notag\\
Case\ II\ :\ \left( p^{2} -pq+q^{2}\right) \equiv -1\bmod pq \notag\\
\\
Taking\ both\ the\ cases\ separately. \notag
\end{gather}
$ \begin{array}{l}
Case\ I:\\
\\
( p+q) \equiv -1\bmod pq
\end{array}$
\begin{gather*}
We\ see\ that\ p+q+1\equiv 0\bmod pq\\
So\ we\ have\ ( p+q) \equiv -1\bmod pq,\ Substituting\ this\ in\ ( 1)\\
We\ get,\ ( 0)^{3} -3\ ( p+1)( q+1)( -1) \equiv 0\bmod pq\\
\Longrightarrow 3\ ( p+1)( q+1) \equiv 0\bmod pq\ \\
( If\ we\ again\ substitute\ \ p+q\equiv -1\bmod pq,\ we\ get\ 3( -p)( -q) \equiv 0\bmod pq)\\
So\ even\ after\ substituting\ p+q\equiv -1\bmod pq,\\
We\ get\ the\ remaining\ product\ again\ as\equiv 0\bmod pq.\\
So\ we\ can\ write\ 3( p+1)( q+1) =pq\cdotp k\\
So\ again\ we\ have\ two\ cases,\\
\ i) \ 3\mid pq,\ \&\ ii) \ When\ 3\mid k\ 
\end{gather*}
$ \begin{array}{l}
Case\ ( i)\\
\\
 When\ 3\mid pq,\ 
\end{array}$
\begin{gather*}
So,\ If\ 3\mid pq,\ then\ either\ p=3\ or\ q=3,\ since\ both\ are\ prime.\\
So\ let\ p=3.\ Then,4( q+1) =qk.\\
Since\ q+1\nmid q\Longrightarrow q+1\mid k.\ Also,\ we\ know\ 4\mid qk.\\
If\ 4\mid k,\ then\ 4( q+1) \mid k\Longrightarrow y=1,\ which\ leads\ to\ a\ contradiction\ as\ 1\ is\ not\ a\ prime.\\
Thus,\ we\ must\ have\ 2\mid q\ and\ 2\mid k.\\
This\ leads\ to\ the\ solutions\ ( p,q) \equiv \ ( 3,2) \ and\ ( 2,3) \ ( by\ symmetry) .
\end{gather*}
$ \begin{array}{l}
Case\ ( ii)\\
\\
When\ 3\mid k,\ 
\end{array}$
\begin{gather}
So,\ if\ 3\mid k\ \Longrightarrow 3m=k, \notag\\
\therefore 3\ ( p+1)( q+1) =pq\cdotp k\equiv ( p+1)( q+1) =pq\cdotp m \notag\\
And\ we\ also\ know\ p+1\nmid p\Longrightarrow p+1\mid qm,\ and\ we\ can\ write\ it\ as,( p+1) \ n=qm. \notag\\
\Longrightarrow q+1=p\cdotp n\ \equiv p\mid ( q+1) \ and\ by\ symmetry\ we\ can\ say\ q\mid ( p+1) . \notag\\
 \notag\\
Now\ we\ can\ see\ that\ as\ both\ p\ and\ q\ are\ primes,\ and\ q\leqslant p+1\ and\ p\leqslant q+1.\ ....(3)\\
From\ ( 3) \ we\ get\ that\ p\ and\ q\ should\ be\ consecutive\ to\ hold\ the\ inequality. \notag\\
( OR) \notag\\
And\ if\ q\ is\ an\ odd\ prime\ then, \notag\\
p\ should\ be\ 2\ from\ p\mid ( q+1) \ and\ q\ should\ be\ 3\ from\ q\mid ( p+1) . \notag\\
And\ if\ q=2\ then\ p=3. \notag\\
This\ leads\ to\ the\ solutions\ ( p,q) \equiv \ ( 3,2) \ and\ ( 2,3) . \notag
\end{gather}
$And\ even\ ( 2,3) \ satisfies\ \left( p^{2} -pq+q^{2}\right) \equiv 1\bmod pq$
$ \begin{array}{l}
Case\ II:\\
\\
\left( p^{2} -pq+q^{2}\right) \equiv -1\bmod pq
\end{array}$
\begin{gather}
We\ have\ \left( p^{2} -pq+q^{2}\right) \equiv -1\bmod pq,\ and\ adding\ 3pq \notag\\
we\ get,\ p^{2} +2pq+q^{2} \equiv -1\bmod pq\Longrightarrow ( p+q)^{2} \equiv -1\bmod pq\\
So,\ we\ get\ ( p+q)^{2} \equiv -1\bmod pq,\ ....(4) \notag\\
now\ looking\ eq\ ( 2) \ we\ see\ that\ if\ \left( p^{2} -pq+q^{2}\right) \equiv -1\bmod pq, \notag\\
then\ this\ must\ be\ ( p+q) \equiv 1\bmod pq,\ squaring\ both\ sides\ we\ get, \notag\\
( p+q)^{2} \equiv 1\bmod pq\ ....(5)\\
from\ eq\ ( 3) \ and\ ( 4) \ we\ get \notag\\
\left( p^{2} -pq+q^{2}\right) \equiv -1\bmod pq,\ have\ No\ solution. \notag
\end{gather}
Conclusion: Only $(2,3)$ is the solution
\begin{equation*}
\end{equation*}
