Find all the integer pairs $(r,s)$ that satisfy $s= (r^2 +3r +8) / (r^2 +r -2)$? I have been trying to solve this question but struggling to see where to start. Examples I've seen that works are the pairs: $(-3,2) , (4,2), (0,-4)$
If integer $d&gt;0$ divides both  $r^2+3r+8, r^2+r-2;$

$d$ must divide  $r^2+3r+8-(r^2+r-2)=2r+10$

$d$ must divide  $r(2r+10)-2(r^2+3r+8)=4r-16$

$d$ must divide  $2(2r+10)-(4r-16)=36$

So, $r^2+r-2=(r+2)(r-1)$ must divide $36$

Now as $r+2-(r-1)=3; 3|(r+2)\iff3|(r-1)$

Case$\#1:$ If $3|(r+2),$ let $r=3s+1\implies s(s+1)|4$ 

so $s(s+1)$ can not have an odd factor $&gt;1\implies s=1,-2\implies r=?,?$

Case$\#2:$ If $3\nmid(r+2),(r+2)(r-1)$ must divide $4\implies r=2,0$
Write the given equation as

\begin{align}
s&amp;=1+2\left(\frac{r+5}{(r+2)(r-1)}\right)\\
 &amp;=1+\frac{4}{r-1}-\frac{2}{r+2}. 
\end{align}

With this, the only values of $r$ that I see satisfying the above equation leading to integer values of $s$ are $r=-5,-3,-1,0, 4$.