Polynomials division- factoring the numerator