\(3,=\left(x-y\right)^3+\left(y-x+x-z\right)^3+\left(z-x\right)^3\\ =\left(x-y\right)^3+\left(y-x\right)^3+3\left(y-x\right)\left(x-z\right)\left(y-x+x-z\right)+\left(x-z\right)^3+\left(z-x\right)^3\\ =\left(x-y\right)^3-\left(x-y\right)^3+3\left(y-x\right)\left(x-z\right)\left(y-z\right)-\left(z-x\right)^3+\left(z-x\right)^3\\ =3\left(y-x\right)\left(x-z\right)\left(y-z\right)\)
\(4,=\left(x^4+3x^3-x^2\right)+\left(3x^3+9x^2-3x\right)-\left(x^2+3x-1\right)\\ =x^2\left(x^2+3x-1\right)+3x\left(x^2+3x-1\right)-\left(x^2+3x-1\right)\\ =\left(x^2+3x-1\right)\left(x^2+3x-1\right)\\ =\left(x^2+3x-1\right)^2\)