1-Find the greatest number they have in common first.
Looking at the expression, there are three numbers: #3, 6, 9#. The GCF (greatest common factor) of these is #3#. Then we look at the greatest variable they have in common. There is only one variable, #x#. However, the #9# does not have any #x# attached to it, therefore we cannot factor out an #x#.
2-Now we have to take out a #3#. When we take out the #3#, we are kind of dividing everything by #3#, separately. For example, when you factor out #3# from #6x^3#, you get #2x^3# since you are basically just dividing the #6# by #3#. Doing the same for #3x^2# and #9#, we get our answer:
3- #3(2x^3-x^2+3)#
Side Note: (this is to help for future questions)
If we were just factoring #6x^3-3x^2#, we would factor out #3x^2#. This is because 3 is the largest common factor for the coefficients and both have x attached to them. But since the degree is not the same, we take the smaller degree of x so that both numbers can be divisible by it.