I suggest using both of Chris's and Thomas's ideas from the comments. Nonreal roots of polynomials with real coefficients come in complex conjugate pairs, so $2-i$ is also a root. This means that $z-(2-i)=z-2+i$ is also a factor. Combining with the factor you named, since they are distinct, their product is a factor, $(z-2-i)(z-2+i)=z^2-4z+5$.
You can then either set up an equation like you had, multiply out and match coefficients, or, perhaps more efficiently, perform standard polynomial long division to find $A$ and $B$ in the equation $(z^2-4z+5)(z^2+Az+B)=z^4-2z^3-z^2+2z+10$.
All that remains is to factor the other quadratic factor, and you can do this with the aid of the quadratic formula or completing the square to find its zeros. On the other hand, if it turns out that the other quadratic factor also has no real roots (which can also be see from the quadratic formula or by completing the square), then you're already done.
Multiplying out and matching coefficients actually is pretty efficient in this case (as now seen in smanoos's answer), but I can think of two good reasons to use long division. First is its simplicity and generality; especially in exam conditions, it's good to have one tool that can always be applied to such problems in as straightforward a manner as possible. Second, it double checks your work for you, because the remainder has to be $0$ when dividing by a factor.