xy+2-2x-y
To factor: rearrange the terms:
xy + 2 - 2x - y = xy - y - 2x + 2 = y(x - 1) - 2(x - 1) = (x -1)(y - 2)
you have to factor
xy-2x+y+2