The intermediate factorization calculation $z^2-z\frac{a^2 +b^2}{ab}+1 = (z-a/b)(z-b/a)$ was coined straightforward by Riley's Mathematical Methods for Physics and Engeneering (eq.24.66).
I've tried completing the square,
$$ z^2-z\frac{a^2 +b^2}{ab}+1 = 0 \\ \bigg( z-\frac{a^2 +b^2}{2ab} \bigg)^2 +1 -\frac{(a^2+b^2)^2}{(2ab)^2} = 0 \\ \bigg( z-\frac{a^2 +b^2}{2ab} \bigg)^2 = \frac{(a^2+b^2)^2}{(2ab)^2}-1 \\ z= \frac{a^2 +b^2}{2ab} \pm \sqrt{\frac{(a^2+b^2)^2}{(2ab)^2}-1} \ , \\ $$ which doesn't nearly suggest the simple end result.
I'm sure it will roll out after reorganizing terms, but I'm interested in an alternative approach which more naturally suggests the end result of $(z-a/b)(z-b/a)$, reflecting the word-use of straightforward in the text.
Context.
Using contour integration to evaluate $I = \int_{0}^{2\pi} \frac{\cos(2\theta)}{a^2+b^2-2ab\cos(\theta)}d\theta$