Factorize the polynomial $P(z) = z^4 - 2z^3-z^2+2z+10$, into linear and/or quadratic factors with real coefficients $2+i$ is given to be one of the roots of the polynomial.
I am doing this as a practice for exam prep.
Since $2+i$, is a root, then $(z-2-i)$ is a factor?
So I have:
$(z-2-i)(z^3-Az^2-Bz+C) = z^4-2z^3-z^2+2z+10$
Then, I group the $z$ terms of the same degrees after I multiply out?
Am I on the right track? Because it seems like this will take quite a while in exam conditions? Thanks for any direction!

As Thomas has said, if $2+i$ is a root then $2-i$ is also root. Hence you have two factors: $z-(2-i)$ and $z-(2+i)$ whose product is $z^2-4z+5$. So we can can assume that there is another quadratic factor $z^2+bz+c$ where $b$ and $c$ are constants to be determined. Obviously their product should yield the given polynomial. Thus,
$$(z^2-4z+5)(z^2+bz+c)= z^4-2z^3-z^2+2z+10.$$
Equating the constant terms you obtain $5c=10$ which gives $c=2$.
Now equating the coefficients of $z$, we obtain the equation;
$$-4c+5b=2 $$ from which we obtain $b=2$. Replacing $b$ and $c$ we now solve for $z$ in the equation  $$z^2+2z+2=0$$ as follows:
$$(z+1)^2+1=0.$$ Thus, $z+1=i$ and $z+1=-i$, which gives $z=-1+i,z=-1-i$.
Hence we have obtained all the factors.
