Since [tex]x^3-8[/tex] is a sum of cubes, (-8 is -2 cubed) it can be factored like so:
[tex]a^3+b^3=(a+b)(a^2-ab+b^2)[/tex]
[tex]a^3=x^3\implies a=x[/tex]
[tex]b^3=-8\implies b=-2[/tex]
[tex]x^3-8=(x+(-2))(x^2-x(-2)+(-2)^2)=\boxed{(x-2)(x^2+2x+4)}[/tex]