\(xy\left(x-y\right)+yz\left(y-z\right)+xz\left(z-x\right)\\ =xy\left(x-y\right)+yz\left[-\left(x-y\right)-\left(z-x\right)\right]+xz\left(z-x\right)\\ =xy\left(x-y\right)-yz\left(x-y\right)-yz\left(z-x\right)+xz\left(z-x\right)\\ =\left(x-y\right)\left(xy-yz\right)+\left(z-x\right)\left(xz-yz\right)\\ =y\left(x-y\right)\left(x-z\right)+z\left(z-x\right)\left(x-y\right)\\ =\left(x-y\right)\left(x-z\right)\left(y-z\right)\)