a: xy=x-y
=>xy-x+y=0
=>xy-x+y-1=-1
=>x(y-1)+(y-1)=-1
=>(x+1)(y-1)=-1
=>\(\left(x+1\right)\left(y-1\right)=1\cdot\left(-1\right)=\left(-1\right)\cdot1\)
=>\(\left(x+1;y-1\right)\in\left\{\left(1;-1\right);\left(-1;1\right)\right\}\)
=>\(\left(x,y\right)\in\left\{\left(0;0\right);\left(-2;2\right)\right\}\)
b: x(y+2)+y=1
=>\(x\left(y+2\right)+y+2=3\)
=>\(\left(x+1\right)\left(y+2\right)=3\)
=>\(\left(x+1\right)\cdot\left(y+2\right)=1\cdot3=3\cdot1=\left(-1\right)\left(-3\right)=\left(-3\right)\left(-1\right)\)
=>\(\left(x+1;y+2\right)\in\left\{\left(1;3\right);\left(3;1\right);\left(-1;-3\right);\left(-3;-1\right)\right\}\)
=>\(\left(x,y\right)\in\left\{\left(0;1\right);\left(2;-1\right);\left(-2;-5\right);\left(-4;-3\right)\right\}\)