2x – 2y – x2 + 2xy – y2 = (2x – 2y) – (x2 – 2xy + y2)
= 2(x – y) – (x – y)2
= (x – y)[2 – (x – y)]
= (x – y)(2 – x + y)
\(2x-2y-x^2+2xy-y^2=2\left(x-y\right)-\left(x^2-2xy+y^2\right)=2\left(x-y\right)-\left(x-y\right)^2=\left(x-y\right)\left[2-\left(x-y\right)\right]=\left(x-y\right)\left(2x+2y\right)\)