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