Find $P$ such that $P' | P$
Let $$P(x) = a_nx^n+....+a_1x+a_0,$$ then we have $$ a_nx^n + ...+a_1x+a_0 = (a_n\cdot n\cdot a) x^n+...+(aa_1+2a_2b)x+a_1b$$ Since $a_n\neq 0$ we get $an=1$, so $a=1/n$
Write $$ {P'(x) \over P(x)} = {1\over ax+b}$$
Then $$a(\ln P(x))' = (\ln(ax+b))'$$ and thus $$a\ln(P(x) = \ln(ax+b) + c$$
So $$P(x) = (ax+b)^{1\over a} e^c = (ax+b)^ne^c$$