\(xy+x-2y+1=0\Leftrightarrow x\left(y+1\right)-2y+2+1=2\Leftrightarrow\left(x+2\right)\left(y+1\right)=1;\)
\(1=1.1=-1.-1\)
\(+,\left(x+2\right)\left(y+1\right)=1.1\Leftrightarrow x=-1;y=0\)
\(+,\left(x+2\right)\left(y+1\right)=-1.-1\Leftrightarrow x=-3;y=-2\)