(x+1)^2(x-x+1)= (x+1)^2(1)= (x+1)(x+1)= x^2 + x + x + 1= x^2 + 2x + 1
(a-2)(a^2+2a+4)= a(a^2+2a+4) - 2(a^2+2a+4)= a^3 + 2a^2 + 4a - 2a^2 - 4a - 8= a^3 - 8
(x+1)^2(x-x+1)
= (x+1)^2(1)
= (x+1)(x+1)
= x^2 + x + x + 1
= x^2 + 2x + 1
(a-2)(a^2+2a+4)
= a(a^2+2a+4) - 2(a^2+2a+4)
= a^3 + 2a^2 + 4a - 2a^2 - 4a - 8
= a^3 - 8