a) \(\left(x^2+2x+1\right)\left(x+1\right)\)
\(=x^3+x^2+2x^2+2x+x+1\)
\(=x^3+3x^2+3x+1\)
b) Ta có: \(\left(x^3-x^2+2x-1\right)\left(5-x\right)\)
\(=5x^3-x^4-5x^2+x^3+10x-2x^2-5+5x\)
\(=-x^4+6x^3-7x^2+15x-5\)
Ta có: \(\left(x-5\right)\left(x^3-x^2+2x-1\right)\)
\(=-\left(5-x\right)\left(x^3-x^2+2x-1\right)\)
\(=x^4-6x^3+7x^2-15x+5\)