1) \(x\left(x-1\right)+\left(1-x\right)^2\)
\(=x\left(x-1\right)+\left(x-1\right)^2\)
\(=\left(x-1\right)\left(x+x-1\right)\)
\(=\left(x-1\right)\left(2x-1\right)\)
2) \(2x\left(x-2\right)-\left(x-2\right)^2\)
\(=\left(x-2\right)\left[2x-\left(x-2\right)\right]\)
\(=\left(x-2\right)\left(2x-x+2\right)\)
\(=\left(x-2\right)\left(x+2\right)\)
3) \(3x\left(x-1\right)^2-\left(1-x\right)^3\)
\(=3x\left(x-1\right)^2+\left(x-1\right)^3\)
\(=\left(x-1\right)^2\left(3x+x-1\right)\)
\(=\left(x-1\right)^2\left(4x-1\right)\)
4) \(3x\left(x+2\right)-5\left(x+2\right)^2\)
\(=\left(x+2\right)\left[3x-5\left(x+2\right)\right]\)
\(=\left(x+2\right)\left(3x-5x-10\right)\)
\(=\left(x+2\right)\left(-2x-10\right)\)
\(=-2\left(x+2\right)\left(x+5\right)\)