So i was learning complex numbers and i came across this problem. In the solution they have made $z-4=i\sqrt{7}$ and then they squared the above equation resulting in $z^2 -8z+16=-7$ then they proceeded by sending $-7$ to the LHS resulting in $z^2 -8z+23=0$.
They then divided the original cubic term by the resulting equation from the above steps to get answer as $-1$. I did not understand why did they do it and how they got $-1$. The final equation looked like this: $z^3 -4z^2 -9z + 91=(z^2 -8z+23)(z+4)-1=-1$.
I personally think they used the $x=nq+r$ where $x$ is divided by $n$ resulting in $q$ as the quotient and $r$ as the remainder. If so then can all the problems like this be solved in the same manner?