$\displaystyle x^3-3x^2-4x+12 = 0$
$\displaystyle [(x-3)x-4]x+12 = 0
$
$\displaystyle f(-2) = 0$
∴ $\displaystyle x^3-3x^2-4x+12$ ≡ $\displaystyle (x+2)(ax^2+bx+c)$
$\displaystyle x^3-3x^2-4x+12$ ≡ $\displaystyle ax^3+bx^2+cx+2ax^2+2bx+2c$
$\displaystyle x^3-3x^2-4x+12$ ≡ $\displaystyle ax^3+bx^2+2ax^2+cx+2bx+2c$
$\displaystyle x^3-3x^2-4x+12$ ≡ $\displaystyle ax^3+(b+2a)x^2+(c+2b)x+2c$
$\displaystyle a =1$; $\displaystyle b+2a = -3$, ∴ $\displaystyle b = -5$; $\displaystyle c+2b -4$, ∴ $\displaystyle c = 6$.
∴ $\displaystyle x^3-3x^2-4x+12$ ≡ $\displaystyle (x+2)(x^2-5x+6)$
$\displaystyle x^2-5x-6 = 0$
$\displaystyle (x-5)x-6 = 0$
$\displaystyle f(2) = 0$
∴ $\displaystyle x^2-5x-4$ ≡ $\displaystyle (x-2)(ax+b)$
$\displaystyle x^2-5x-4 $ ≡ $\displaystyle ax^2+bx-2ax-2b$
$\displaystyle x^2-5x-4$ ≡ $\displaystyle (a)x^2+(b-2a)x-2b$
$\displaystyle a = 1$; $\displaystyle b-2a$ = $\displaystyle -5$, ∴ $\displaystyle b = -3$.
∴ $\displaystyle x^2-5x-4$ ≡ $\displaystyle (x-2)(x-3)$
∴ $\displaystyle x^3-3x^2-4x+12$ ≡ $\displaystyle (x+2)(x-2)(x-3)$