<s>[INST] Find all $x,y$ so that $\dfrac{x+y+2}{xy-1}$ is an integer. I am trying to find the integers $x,y$ so that 
$\dfrac{x+y+2}{xy-1}$ is an integer. 
What I have done:
I suppose there exists $t$ such that $$t=\dfrac{x+y+2}{xy-1}$$ where $xy\neq 1$ then consider the following scenarios:
$$x=y$$ $$x>y>0$$  $$x>0>y$$ ,etc.
This approach  helps me find the solutions but it is very long. Any simpler method?
 [/INST] Wlog $|x|\le |y|$.
$x=0$ leads to $\frac{y+2}{-1}$, which is always an integer.
$x=1$ leads to $\frac{y+3}{y-1}=1+\frac4{y-1}$ which is an integer iff $y-1$ is a (positive or negative) divisor of $4$, so $y\in\{-3,-1,2,3,5\}$ ($y=0$ is excluded by $|y|\ge |x|$)
$x=-1$ leads to $\frac{y+1}{-y-1}=-1$, always an integer
$|x|\ge2$ leads to $|xy-1|\ge 2|y|-1\ge 3$ and $|x+y+2|\le 2|y|+2$, so that $\left|\frac{x+y+2}{xy-1}\right|\le\frac{2|y|+2}{2|y|-1}=1+\frac{3}{2|y|-1}\le 2$ with equality only for $|x|=|y|=2$. So we need only check the special case $|x|=|y|=2$ and otherwise if the quotient can be $-1$ or $0$ or $1$.


*

*$(2,2)$ leads to quotient $2$; $(2,-2)$ and $(-2,2)$ lead to $-\frac 25$; $(-2,-2)$ leads to $-\frac 23$

*The quotient is $0$ iff $y=-x-2$.

*The quotient is $1$ iff $x+y+2=xy-1$, i.e., $(x-1)(y-1)=4$; the finitely many factorizations give us finitely many solutions $x=y=3$ or $x=2,y=5$ (all else is exclude by $|y|\ge |x|\ge 2$)

*The quotient is $-1$ iff $x+y+2=1-xy$, i.e., $(x+1)(y+1)=0$ - contradicting $|y|\ge|x|\ge 2$.


So in summary, as solutions $(x,y;\frac{x+y+2}{xy-1})$ we have the families
$$ (0,t;-t-2), (t,0;-t-2), (-1,t;-1),(t,-1;-1),(t,-2-t;0)$$
and the special solutions
$$(1,2;5),(2,1;5),(1,3;3),(3,1;3),(1,5;2),(5,1;2),(2,2;2),(3,3;1),(2,5;1),(5,2;1).$$
</s>