Answer
a. $q^3+q^2 +2q+3$.
b. $ h^2 -3h+5-\frac{3}{h+3}$.
Work Step by Step
a.
The given expression is
$(q^4+q^2+q-3)\div(q-1)$
Rewrite in standard form.
$(q^4+0q^3+q^2+q-3)\div(q-1)$
$\begin{matrix}
& q^3 & +q^2 &+2q &+3& & \leftarrow &Quotient\\
&-- &-- &--&--& \\
q-1) &q^4&+0q^3&+q^2&+q&-3 & \\
& q^4 & -q^3 & && & \leftarrow &q^3(q-1) \\
& -- & -- & & && \leftarrow &subtract \\
& 0 & +q^3 & +q^2 & & \\
& & q^3 & -q^2 & & & \leftarrow & q^2(q-1) \\
& & -- & -- & & &\leftarrow & subtract \\
& & 0&+2q^2 &+q & \\
& & & 2q^2& -2q && \leftarrow & 2q(q-1) \\
& & & -- & -- && \leftarrow & subtract \\
& & & 0 & +3q &-3& \leftarrow & Remainder \\
& & & & 3q& -3 & \leftarrow & 3(q-1) \\
& & && -- & -- & \leftarrow & subtract \\
& & & & 0 &0& \leftarrow & Remainder
\end{matrix}$
The answer is
$\Rightarrow Quotient + \frac{Remainder}{Divisor}$
$\Rightarrow q^3+q^2 +2q+3+\frac{0}{q-1}$
Simplify.
$\Rightarrow q^3+q^2 +2q+3$.
b.
The given expression is
$(h^3-4h+12)\div(h+3)$
Rewrite in standard form.
$(h^3+0h^2-4h+12)\div(h+3)$
$\begin{matrix}
& h^2 & -3h &+5 & & \leftarrow &Quotient\\
&-- &-- &--&& \\
h+3) &h^3&+0h^2&-4h&+12 & \\
& h^3 & +3h^2 & & & \leftarrow &h^2(h+3) \\
& -- & -- & & & \leftarrow &subtract \\
& 0 & -3h^2 & -4h & \\
& & -3h^2 & -9h & & \leftarrow & -3h(h+3) \\
& & -- & -- & &\leftarrow & subtract \\
& & 0&+5h &+12& \\
& & & 5h& +15 & \leftarrow & 5(h+3) \\
& & & -- & -- & \leftarrow & subtract \\
& & & 0 & -3& \leftarrow & Remainder
\end{matrix}$
The answer is
$\Rightarrow Quotient + \frac{Remainder}{Divisor}$
$\Rightarrow h^2 -3h+5+\frac{-3}{h+3}$
Simplify.
$\Rightarrow h^2 -3h+5-\frac{3}{h+3}$.