Answer
$f(x)= (x+2)^{2}(x-3)(x+1)$
Work Step by Step
If k is a zero of f, then, by the factor theorem, (x-k) is a factor of f(x).
Synthetic division gives us a quotient q(x), with degree one less than f(x).
and we know the remainder is zero,
so $f(x)=(x-k)\cdot q(x).$
We use this first.
$k=-2$
$\left\{\begin{array}{lllllll}
-2 & | & 1 & 2 & -7 & -20 & -12\\
& & & -2 & 0 & 14 & 12\\
& & -- & -- & -- & -- & --\\
& & 1 & 0 & -7 & -6 & \fbox{$0$}
\end{array}\right.$
$f(x)= (x+2)(x^{3}-7x-6)$
$k=-2$ has multiplicity 2, so $(x+2)$ is a factor of $(x^{3}-7x-6)$.
We divide once more:
$\left\{\begin{array}{lllllll}
-2 & | & 1 & 0 & -7 & -6 & \\
& & & -2 & 4 & 6 & \\
& & -- & -- & -- & -- & --\\
& & 1 & -2 & -3 & \fbox{$0$} &
\end{array}\right.$
$f(x)= (x+2)(x+2)(x^{2}-2x-3)$
We now factor the trinomial $x^{2}+bx+c$ by searching for
two factors of $c$ whose sum is $b.$
Factors of $-3$ whose sum is $-2$ ... are $-3$ and $+1$:
$x^{2}-2x-3=(x-3)(x+1)$
So,
$f(x)= (x+2)^{2}(x-3)(x+1)$