Precalculus: Concepts Through Functions, A Unit Circle Approach to Trigonometry (3rd Edition)

$x^3-8$
We distribute as follows: $$(x-2)(x^2+2x+4)= x^3+2x^2+4x-2x^2-4x-8\\ =x^3-8 .$$