So for this, I will be factoring by grouping. Firstly, factor x³ + 2x² and -4x - 8 separately. Make sure that they have the same quantity inside of the parentheses:
[tex]p(x)=x^2(x+2)-4(x+2)[/tex]
Now we can rewrite it as:
[tex]p(x)=(x^2-4)(x+2)[/tex]
However, we aren't finished factoring yet. The first factor, x² - 4, can be factored further using the difference of squares. The difference of squares goes by the formula here: [tex]x^2-y^2=(x+y)(x-y)[/tex] . In this case:
[tex]x^2-4=(x+2)(x-2)\\p(x)=(x+2)(x-2)(x+2)[/tex]
In short, the answer is [tex]p(x)=(x+2)(x-2)(x+2)\ \textsf{OR}\ p(x)=(x-2)(x+2)^2[/tex]