In order to factor a polynomial
, you have to find its roots
. Then, you can write

where
is the leading coefficient of

a: Let's try to solve

the disciminant of this quadratic function is

So, this quadratic function has no roots, which implies that it cannot be factorised (using real numbers, at least. Are you allowing complex numbers? Let me know in that case)
b: Similarly, we set up

This time we can find the two solutions

which yields the factorization
