First, multiply the two terms on the right. To multiply these two terms you multiply each individual term in the left parenthesis by each individual term in the right parenthesis.
#(x - 9)(color(red)(x) - color(red)(2))(color(blue)(3x) + color(blue)(2))# becomes:
#(x - 9)((color(red)(x) xx color(blue)(3x)) + (color(red)(x) xx color(blue)(2)) - (color(red)(2) xx color(blue)(3x)) - (color(red)(2) xx color(blue)(2)))#
#(x - 9)(3x^2 + 2x - 6x - 4)#
We can now combine like terms:
#(x - 9)(3x^2 + (2 - 6)x - 4)#
#(x - 9)(3x^2 + (-4)x - 4)#
#(x - 9)(3x^2 - 4x - 4)#
Now, do the same thing for the two remaining terms:
#(color(red)(x) - color(red)(9))(color(blue)(3x^2) - color(blue)(4x) - color(blue)(4))# becomes:
#(color(red)(x) xx color(blue)(3x^2)) - (color(red)(x) xx color(blue)(4x)) - (color(red)(x) xx color(blue)(4)) - (color(red)(9) xx color(blue)(3x^2)) + (color(red)(9) xx color(blue)(4x)) + (color(red)(9) xx color(blue)(4))#
#3x^3 - 4x^2 - 4x - 27x^2 + 36x + 36#
We can now group and combine like terms:
#3x^3 - 4x^2 - 27x^2 - 4x + 36x + 36#
#3x^3 + (-4 - 27)x^2 + (-4 + 36)x + 36#
#3x^3 + (-31)x^2 + 32x + 36#
#3x^3 - 31x^2 + 32x + 36#