factorising the quadratic polynomial