*Multiply first (x+3) by (x+3). Use the FOIL method for this.
(x+3)(x+3)
x²+6x+9
*Multiply (x+3) again by the answer above which is x²+6x+9.Use the distributive property for this and combine similar terms.
(x+3)(x²+6x+9)
x³ + 6x² + 9x
3x² + 18x + 27
-----------------------------
x³ + 9x² + 27x + 27 → Final answer :)