=x²-2xy-2x+xy-2y²-2y-x+2y+2
=x(x-2y-2)+y(x-2y-2)-(x-2y-2)
=(x-2y-2)(x+y-1)
=x³-x²+2x²-2x-2x+2
=x²(x-1)+2x(x-1)-2(x-1)
=(x-1)(x²+2x-2)
=x²-2xy-2x+xy-2y²-2y-x+2y+2
=x(x-2y-2)+y(x-2y-2)-(x-2y-2)
=(x-2y-2)(x+y-1)
=x³-x²+2x²-2x-2x+2
=x²(x-1)+2x(x-1)-2(x-1)
=(x-1)(x²+2x-2)