Find all pairs of positive integers $(a, b)$ such that $\frac{a^{3} b-1}{a+1}$ and $\frac{b^{3} a+1}{b-1}$ are integers.
Working modulo $a+1: a \equiv-1[a+1]$ so $a^{3} b-1 \equiv 0[a+1]$ if and only if $-b-1 \equiv 0[a+1]$ hence if and only if $a+1 \mid b+1$.

Similarly, working modulo $b-1: b \equiv 1[b-1]$ so $b^{3} a+1 \equiv 0[a+1]$ if and only if $a+1 \equiv 0[b-1]$ hence if and only if $b-1 \mid a+1$.

It is therefore necessary that $b-1 \mid b+1$, so $b \mid 2$ with $b \geqslant 0$. Thus $b=0,2$ or 3.

In these 3 cases, it is necessary and sufficient that $b-1|a+1| b+1$, so that $-1|a+1| 1$ or $1|a+1| 3$ or $2|a+1| 4$. This gives us exactly 5 non-negative solutions:

$$
(0,0),(1,2),(2,2),(1,3),(3,3)
$$