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