Multiply each of the terms in the first set of parentheses by each of the terms in the second set of parentheses:
#color(white)=(3x^2-5x-2)(x^3+2x^2-3x+9)#
#=3x^5+6x^4-9x^3+27x^2-5x^4-10x^3+15x^2-45x-2x^3-4x^2+6x-18#
Now, group all the like terms.
#color(white)=3x^5+6x^4-9x^3+27x^2-5x^4-10x^3+15x^2-45x-2x^3-4x^2+6x-18#
#=color(red)(3x^5)+color(orange)(6x^4)color(yellow)(-9x^3)+color(green)(27x^2)color(orange)(-5x^4)color(yellow)(-10x^3)+color(green)(15x^2)color(blue)(-45x)color(yellow)(-2x^3)color(green)(-4x^2)+color(blue)(6x)color(purple)(-18)#
#=color(red)(3x^5)+color(orange)(6x^4-5x^4)color(yellow)(-9x^3-10x^3-2x^3)+color(green)(27x^2+15x^2-4x^2)color(blue)(-45x+6x)color(purple)(-18)#
Now, combine the like terms:
#color(white)=color(red)(3x^5)+color(orange)(6x^4-5x^4)color(yellow)(-9x^3-10x^3-2x^3)+color(green)(27x^2+15x^2-4x^2)color(blue)(-45x+6x)color(purple)(-18)#
#=color(red)(3x^5)+color(orange)(x^4)color(yellow)(-9x^3-10x^3-2x^3)+color(green)(27x^2+15x^2-4x^2)color(blue)(-45x+6x)color(purple)(-18)#
#=color(red)(3x^5)+color(orange)(x^4)color(yellow)(-21x^3)+color(green)(27x^2+15x^2-4x^2)color(blue)(-45x+6x)color(purple)(-18)#
#=color(red)(3x^5)+color(orange)(x^4)color(yellow)(-21x^3)+color(green)(38x^2)color(blue)(-45x+6x)color(purple)(-18)#
#=color(red)(3x^5)+color(orange)(x^4)color(yellow)(-21x^3)+color(green)(38x^2)color(blue)(-39x)color(purple)(-18)#
The final polynomial is #3x^5+x^4-21x^3+38x^2-39x-18#.