\(xy+2x-y=5\)
\(\Rightarrow xy+2x-y-2=3\)
\(\Rightarrow x\left(y+2\right)-1\left(y+2\right)=3\)
\(\Rightarrow\left(x-1\right)\left(y+2\right)=3\)
\(\Rightarrow\left(x-1\right);\left(y+2\right)\inƯ\left(3\right)\)
\(Ư\left(3\right)=\left\{\pm1;\pm3\right\}\)
\(\Rightarrow x-1=1\Rightarrow x=2\)
\(y+2=3\Rightarrow y=1\)
\(\Rightarrow x-1=-1\Rightarrow x=0\)
\(y+2=-3\Rightarrow y=-5\)
\(\Rightarrow x-1=3\Rightarrow x=4\)
\(y+2=1\Rightarrow y=-1\)
\(\Rightarrow x-1=-3\Rightarrow x=-2\)
\(y+2=-1\Rightarrow y=-3\)