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