Please help me write the polynomial by multiplying the factors together?

(x+5)(x-4)^2

First expand powers to get

(x+5)(x-4)^2
=(x+5)(x-4)(x-4)

Square the (x-4)² term using (a+b)²=(a²+2ab+b²)
=(x+5)(x²-8x+16)

Now expand the last factor using distributivity:
=x(x²-8x+16)+5(x²-8x+16)

Collect terms and add
=x³-8x²+16x + 5x²-40x+80
=x²-3x²-24x+80

Quick check: Let x=1, then
(x+5)(x²-8x+16)=(1+5)(1-8+16)=6*9=54
x²-3x²-24x+80=1-3-24+80=54
There is a good chance that the answer is correct.