First, multiply the two terms on the left. To multiply these two terms you multiply each individual term in the left parenthesis by each individual term in the right parenthesis.
(color(red)(2x) + color(red)(1))(color(blue)(3x) + color(blue)(1))(x + 4) becomes:
((color(red)(2x) xx color(blue)(3x)) + (color(red)(2x) xx color(blue)(1)) + (color(red)(1) xx color(blue)(3x)) + (color(red)(1) xx color(blue)(1)))(x + 4)
(6x^2 + 2x + 3x + 1)(x + 4)
We can now combine like terms:
(6x^2 + (2 + 3)x + 1)(x + 4)
(6x^2 + 5x + 1)(x + 4)
We now use the same process for the two remaining terms:
(color(red)(6x^2) + color(red)(5x) + color(red)(1))(color(blue)(x) + color(blue)(4)) becomes:
(color(red)(6x^2) xx color(blue)(x)) + (color(red)(6x^2) xx color(blue)(4)) + (color(red)(5x) xx color(blue)(x)) + (color(red)(5x) xx color(blue)(4)) + (color(red)(1) xx color(blue)(x)) + (color(red)(1) xx color(blue)(4))
6x^3 + 24x^2 + 5x^2 + 20x + 1x + 4
We can now combine like terms:
6x^3 + (24 + 5)x^2 + (20 + 1)x + 4
6x^3 + 29x^2 + 21x + 4