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