Given is x^3 + 3x^2 + 9x +27
Let us try it using grouping . group of first two terms then group on last two terms
we can factor out x^2 from first two terms so it is x^2( x+ 3)
we can factor out 9 from last two terms that makes : 9 ( x+ 3)
given expression is written as : x^2( x+3) + 9 ( x+3)
Now there are two terms being add having a common term ( x+3)
let us factor out it . ( x+3) ( x^2 +9 )
Answer ( x+3)( x^2+9)