solving the quadratic in $ \ x^m $
we see the two roots are $\ x^m=\ |a|(cos\theta+isin\theta) $
and $ \ |a|(cos\theta-isin\theta) $
take m-th root of the first root let call them $\ t_{1},t_{2},......t_{m} $
see they for an regular m-polygon whose circumcircle is centered at origin with
radius $ \ |a| $ on complex plane.
similarly,do for the other root and get $ \ s_{1},s_{2},......s_{m} $ who form another regular m-polygon with same circumcircle
now as the two values of x^m as root of the quadratic are complex conjugate.
so are the corresponding vertices of two polygons.
let pair up those conjugate vertices(i.e actually the corrsponding roots)
wlog we can pair up like $\ (t_{1},s_{1}),(t_{2},s_{2})......(t_{m},s_{m}) $
then the required
factorisation is following
$ \ f_{i}(x)=(x-t_{i})(x-s_{i}) $ i=1,2,...m
$ \ P(x)=f_{1}(x)......f_{m}(x) $