\(\left(x-y\right)^2+\left(x+y\right)^2-2\left(x+y\right)\left(x-y\right)-4x^2\)
\(=\left(x-y-x-y\right)^2-\left(2x\right)^2\)
\(=\left(-2y^2\right)-\left(2x\right)^2=\left(2y\right)^2-\left(2x\right)^2=\left(2y-2x\right)\left(2y+2x\right)=4\left(y-x\right)\left(x+y\right)\)