We have two terms: 3x^3 and -9x
You have the correct GCF which is 3x. This GCF is factored out and placed to the left of the parenthesis, as you have done correctly so far.
Since 3x times x^2 is equal to 3x^3, this means that you have the proper first term inside the parenthesis. So far so good.
Where you make a mistake is with the second term inside the parenthesis. Notice how 3x times 2 is NOT equal to -9x
You need to fill in the blank:
3x times _________ = -9x
It turns out that -3 goes in that blank since 3x times -3 = -9x
This is why the final answer for problem 3 is 3x(x^2 - 3)