Answer :
First we expand by distributing sum groups
X(x^2 + 2x + 4 ) - 2 (x^2 + 2x + 4)
Then you expand by distributing terms
X^3 + 2 x^2 + 4x - 2 ( x^2 + 2x + 4)
Collect like terms
X^3 + (2x^2 - 2x^2) + (4x - 4x) - 8
Simplify
X^3 - 8
X(x^2 + 2x + 4 ) - 2 (x^2 + 2x + 4)
Then you expand by distributing terms
X^3 + 2 x^2 + 4x - 2 ( x^2 + 2x + 4)
Collect like terms
X^3 + (2x^2 - 2x^2) + (4x - 4x) - 8
Simplify
X^3 - 8