1.(x-2)²-x+2
=(x-2)²-(x-2)
=(x-2)(x-2-1)
=(x-2)(x-3)
2.x²y(x-y)-xy²(y-x)
=x²y(x-y)+xy²(x-y)
=xy(x-y)(x+y)