Or, if you wanted to be really long-winded about it (and didn't have a set method that you had to use), you could:
(1) Expand your cubic:
(2) Use the remainder theorem to find roots by substituting in divisors of 7 (which, as a prime, means
is a root
is a factor
(3) Factorise your cubic using your new-found factor
(4) Re-expand and then compare to get the coefficient of x in the quadratic term (i.e. to find the a)
(5) Check the discriminant of your quadratic to see if you could factorise it further
, so it can't be factorised over the reals any further.
It's not quick and it's not pretty, but it definitely works
"It's never crowded along the extra mile"
Graduated, and done with maths forever