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