To multiply these two terms you multiply each individual term in the left parenthesis by each individual term in the right parenthesis.
(color(red)(x) + color(red)(1))(color(blue)(x^2) + color(blue)(x) + color(blue)(1))(x+1)(x2+x+1) becomes:
(color(red)(x) xx color(blue)(x^2)) + (color(red)(x) xx color(blue)(x)) + (color(red)(x) xx color(blue)(1)) + (color(red)(1) xx color(blue)(x^2)) + (color(red)(1) xx color(blue)(x)) + (color(red)(1) xx color(blue)(1))(x×x2)+(x×x)+(x×1)+(1×x2)+(1×x)+(1×1)
x^3 + x^2 + x + x^2 + x + 1x3+x2+x+x2+x+1
We can now group and combine like terms:
x^3 + x^2 + x^2 + x + x + 1x3+x2+x2+x+x+1
x^3 + 1x^2 + 1x^2 + 1x + 1x + 1x3+1x2+1x2+1x+1x+1
x^3 + (1 + 1)x^2 + (1 + 1)x + 1x3+(1+1)x2+(1+1)x+1
x^3 + 2x^2 + 2x + 1x3+2x2+2x+1