I edited the subject

\(x^3-x^2-4x^2+8x-4\)

\(=x^2\left(x-1\right)-\left(4x^2-8x+4\right)\)

\(=x^2\left(x-1\right)-\left[\left(2x\right)^2-2\cdot2x\cdot2+2^2\right]\)

\(=x^2\left(x-1\right)-\left(2x-2\right)^2\)

\(=x^2\left(x-1\right)-4\left(x-1\right)^2\)

\(=\left(x-1\right)\left[x^2-4\left(x-1\right)\right]\)