hy,i have trouble doing (x+1) with an exponent 3 on top of the parentheses and (x+1) with an exponent 4 on top of the parentheses thank you

You mean finding (x+1)^3 and (x+1)^4.

Keep using foil.

(x+1)*(x+1)*(x+1)
=(x^2 + 2x + 1)*(x + 1)
= x^3 + 2x^2 + x + x^2+ 2x + 1
(x+1)^3 = x^3 + 3x^2 + 3x + 1

(x^3 + 3x^2 + 3x + 1)(x+1)
= x^4 + 3x^3 + 3x^2 + x + x^3 + 3x^2 + 3x + 1
(x+1)^4 = x^4 + 4x^3 + 6x^2 + 4x + 1