x²y²+xy-x²-y²+x+y+2
=(x²y²-x²-y²+1)+(xy+x+y+1)
=[x²(y²-1)-(y²-1)]+[x(y+1)+(y+1)]
=(x²-1)(y²-1)+(x+1)(y+1)
=(x+1)(x-1)(y+1)(y-1)+(x+1)(y+1)
=(x+1)(y+1)[(x-1)(y-1)+1]
=(x+1)(y+1)(xy-x-y+2)
x²y²+xy-x²-y²+x+y+2
=(x²y²-x²-y²+1)+(xy+x+y+1)
=[x²(y²-1)-(y²-1)]+[x(y+1)+(y+1)]
=(x²-1)(y²-1)+(x+1)(y+1)
=(x+1)(x-1)(y+1)(y-1)+(x+1)(y+1)
=(x+1)(y+1)[(x-1)(y-1)+1]
=(x+1)(y+1)(xy-x-y+2)