x2(y - z) + y2(z - x) + z2(x - y)
= z2(x - y) + x2 y - x2 z + y2 z - y2 x
= z2(x - y) + (x2 y - y2 x) + (- x2 z + y2 z)
= (x - y)(z2 + xy - zx - zy)
= (x - y)[(z2 - zx) + (xy - zy)]
= (x - y)(z - x)(z -y)
\(x^2\left(y-z\right)+y^2\left(z-x\right)+z^2\left(x-y\right)\)
\(=x^2\left(y-z\right)+y^2\left(z-y+y-x\right)\)
\(=x^2\left(y-z\right)-y^2\left(y-z\right)-y^2\left(x-y\right)+z^2\left(x-y\right)\)
\(=\left(x-y\right)\left(x+y\right)\left(y-z\right)+\left(z-y\right)\left(y+z\right)\left(x-y\right)\)
\(=\left(x-y\right)\left(y-x\right)\left(x-z\right)\)