a) Ta có: \(\left(x+2\right)\left(2x^2-3x+4\right)-\left(x^2-1\right)\left(2x+1\right)\)
\(=2x^3-3x^2+4x+4x^2-6x+8-\left(2x^3+x^2-2x-1\right)\)
\(=2x^3+x^2-2x+8-2x^3-x^2+2x+1\)
=9
b) Ta có: \(\left(x-y\right)\left(x^4+x^3y+x^2y^2+xy^3+y^4\right)\)
\(=x^5+x^4y+x^3y^2+x^2y^2+xy^4-x^4y-x^3y^2-x^2y^3-xy^4-y^5\)
\(=x^5-y^5\)