The difference of two cubes: a^3+b^3= (a+b)(a^2-ab+b^2)
So we have x^3+8 = (X+2)(x^2-2x+4)
square the first
Multiply the first and second
square the second
Notice that the sign in front of the middle term is opposite that of the first factor, if it wasn't the problem wouldn't work :)