\(2x^2+2y^2-4xy-xz+yz=\left(2x^2+2y^2-4xy\right)-\left(xz-yz\right)=2\left(x^2-2xy+y^2\right)-z\left(x-y\right)=2\left(x-y\right)^2-z\left(x-y\right)=\left(x-y\right)\left(2x-2y-z\right)\)
\(=2\left(x^2-2xy+y^2\right)-\left(xz-yz\right)\)
\(=\left(x-y\right)\left(2x-2y-z\right)\)