`a,`
`3x(x^2-5x+7)`
`= 3x*x^2+3x*(-5x)+3x*7`
`= 3x^3-15x^2+21x`
`b,`
`(x+4)(-x^2+6x+5)`
`= x(-x^2+6x+5)+4(-x^2+6x+5)`
`= -x^3+6x^2+5x-4x^2+24x+20`
`= -x^3+2x^2+29x+20`
A=3x^3-15x^2+21x
B=-x^3+6x^2+5x-4x^2+24x+20
=-x^3+2x^2+29x+20
a: =3x^3-15x^2+21x
b: =-x^3+6x^2+5x-4x^2+24x+20
=-x^3+2x^2+29x+20