ok i know the answer is 4(x^2+3)^3(2x)
but i don't understand where did the (2x) come from
Why wouldn't it just be 4(x^2+3)^3 since the rule is d/dx X^n = nx^(n-1)
Your rule is correct but you must also use the chain rule since your function is a function of a function!
Let's imagine that $\displaystyle g(x) = x^2+3 $, and $\displaystyle f(x) = 4x^{3} $
Then your function can be written $\displaystyle h(x) = f(g(x)) $
And the chain rule says that $\displaystyle h'(x) = f'(g(x)) \times g'(x) $
The first is correct.
The Chain Rule states, $\displaystyle \frac{d}{dx}f(g(x))=f'(g(x))g'(x)$. The rule works because the rate of change of $\displaystyle g(x)$ multiplies the rate of change of $\displaystyle f(g(x))$. Hence, we have
$\displaystyle \frac{d}{dx}(x^3+9)^4 = 4(x^3+9)^3 \cdot 3x^2= 12x^2(x^3+9)^3.$