Answer
$-2z^2+3z-4+\frac{{5}}{{z+1}}$
Work Step by Step
Re-arranging the order of the terms, the given is equivalent to
$$
(-2z^3+z^2-z+1)÷(z+1)
.$$
Using the long division method shown below, then
$$\begin{aligned}
&
(-2z^3+z^2-z+1)÷(z+1)
\\&=
-2z^2+3z-4+\frac{\color{red}{5}}{\color{blue}{z+1}}
.\end{aligned}
$$