a) \(\left(x^2-2x+1\right)\left(x-1\right)\)
\(=x^3-x^2-2x^2+2x+x-1\)
\(=x^3+\left(-x^2-2x^2\right)+\left(2x+x\right)-1\)
\(=x^3-3x^2+3x-1\)
b) \(\left(x^3-2x^2+x-1\right)\left(5-x\right)\)
\(=5x^3-x^4-10x^2+2x^3+5x-x^2-5+x\)
\(=-x^4+\left(5x^3+2x^3\right)+\left(-10x^2-x^2\right)+\left(5x+x\right)-5\)
\(=-x^4+7x^3-11x^2+6x-5\)
\(\Rightarrow\) \(\left(x^3-2x^2+x-1\right)\left(x-5\right)\)
\(=-\left(x^3-2x^2+x-1\right)\left(5-x\right)\)
\(=-\left(-x^4+7x^3-11x^2+6x-5\right)\)
\(=x^4-7x^3+11x^2-6x+5\)