\(a,
3x\left(x-1\right)^2-2x\left(x+3\right)\left(x-3\right)+4x\left(x-4\right)\)
\(=3x\left(x^2-2x+1\right)-2x\left(x^2-9\right)+4x^2-16x\)
\(=3x^3-6x^2+3x-2x^3+18x+4x^2-16x\)
\(=x^3-2x^2+5x\)
_________________________________________
\(b,\left(x+2\right)\left(x^2-2x+4\right)+\left(x-3\right)\left(x^2+3x+9\right)+19\)
\(=x^3+8+x^3-27+19\)
\(=2x^3\)
a: \(=3x\left(x^2-2x+1\right)-2x\left(x^2-9\right)+4x^2-16x\)
\(=3x^3-6x^2+3x-2x^3+18x+4x^2-16x\)
\(=x^3-2x^2+5x\)
b: \(=x^3+8+x^3-27+19=2x^3\)