factorise x2+px+qx+pq
I assume we have....
x^2+px+qx+pq ....if so.....
x(x + p) + q(x + p) = (factor out the common factor x + p )
(x + p)(x + q)