Answer
$x^{4}+x^{3}+2x-1+\displaystyle \frac{3}{x+2}$
Work Step by Step
When dividing a polynomial $f(x)$ with $(x-k)$
We set up synthetic division $\quad \text{divisor } )\overline{\text{ dividend }}$,
by placing $k$ in place of the divisor,
and listing ALL coefficients of $f(x)$ (including the zeros ), starting from highest power of x.
$k=-2$
$ \begin{array}{lllllllll}
& & -- & -- & -- & -- & -- & -- & \\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1 & \\
& & & & & & & & \\
& & -- & -- & -- & -- & -- & -- & \\
& & & & & & & & \\
& & & & & & & &
\end{array}$
We are ready.
Bring down the leading coefficient, $1$
Multiply $(-2)(1)=-2$ and place it in the next free slot of the middle row.
$ \begin{array}{lllllllll}
& & -- & -- & -- & -- & -- & -- & \\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1 & \\
& & & -2 & & & & & \\
& & -- & -- & -- & -- & -- & -- & \\
& & 1 & & & & & & \\
& & & & & & & &
\end{array}$
Add $3+(-2)=1$ and place $1$ in the bottom row.
Multiply $(-2)(1)=-2$ and place it in the next free slot of the middle row.
$ \begin{array}{lllllllll}
& & -- & -- & -- & -- & -- & -- & \\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1 & \\
& & & -2 & -2 & & & & \\
& & -- & -- & -- & -- & -- & -- & \\
& & 1 & 1 & & & & & \\
& & & & & & & &
\end{array}$
Add $2+(-2) =0$ and place $0$ in the bottom row.
Multiply $(-2)(0)=0$ and place it in the next free slot of the middle row.
$ \begin{array}{lllllllll}
& & -- & -- & -- & -- & -- & -- & \\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1 & \\
& & & -2 & -2 & 0 & & & \\
& & -- & -- & -- & -- & -- & -- & \\
& & 1 & 1 & 0 & & & & \\
& & & & & & & &
\end{array}$
Add $2+(0)=2$ and place it in the bottom row.
Multiply $(-2)(2)=-4$ and place it in the next free slot of the middle row.
$ \begin{array}{lllllllll}
& & -- & -- & -- & -- & -- & -- & \\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1 & \\
& & & -2 & -2 & 0 & -4 & & \\
& & -- & -- & -- & -- & -- & -- & \\
& & 1 & 1 & 0 & 2 & & & \\
& & & & & & & &
\end{array}$
Add $3+(-4)=-1$ and place it in the bottom row.
Multiply $(-2)(-1)=2$ and place it in the next free slot of the middle row.
$ \begin{array}{lllllllll}
& & -- & -- & -- & -- & -- & -- & \\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1 & \\
& & & -2 & -2 & 0 & -4 & 2 & \\
& & -- & -- & -- & -- & -- & -- & \\
& & 1 & 1 & 0 & 2 & -1 & & \\
& & & & & & & &
\end{array}$
Add $1+(2)=3$ and place it in the bottom row.
$ \begin{array}{llllllll}
& & -- & -- & -- & -- & -- & --\\
-2 & ) & 1 & 3 & 2 & 2 & 3 & 1\\
& & & -2 & -2 & 0 & -4 & 2\\
& & -- & -- & -- & -- & -- & --\\
& & 1 & 1 & 0 & 2 & -1 & \fbox{$3$}\\
& & & & & & &
\end{array}$
Interpret the result:
The last number of the bottom row represents the remainder, $3.$
The rest of the bottom row holds coefficients of the quotient, which has a degree of one less than $f(x):\quad q(x)=x^{4}+x^{3}+2x-1$
So, $\displaystyle \quad \frac{f(x)}{x-k}=q(x)+\frac{r}{x-k}$
$\displaystyle \frac{x^{5}+3x^{4}+2x^{3}+2x^{2}+3x+1}{x+2}=\quad x^{4}+x^{3}+2x-1+\frac{3}{x+2}\quad $