6x
42/6 = 7 (valid), 18/6 = 3 (valid), 12/6 = 2 (valid)
7, 8, 9, 10, and 11 are all not divisible by 12, and 12 is not divisible by 18, so 6 is the highest number.
Also, each number has at least one x, so you can take one out.
Remaining=
6x (7 + 3x^2 + 2x^3)