\(x^3-3x^2-4x+12\)
\(=x^2\left(x-3\right)-\left(4x-12\right)\)
\(=x^2\left(x-3\right)-4\left(x-3\right)\)
\(=\left(x^2-4\right)\left(x-3\right)\)
\(=\left(x+2\right)\left(x-2\right)\left(x-3\right)\)
\(x^3-3x^2-4x+12\)
\(=x^2\left(x-3\right)-4\left(x-3\right)\)
\(=\left(x^2-4\right)\left(x-3\right)\)
\(=\left(x+2\right)\left(x-2\right)\left(x-3\right)\)