Just in case a picture helps...
Given so many layers...
... we need to apply...
... the chain rule at least twice. (Straight continuous lines differentiate downwards (integrate up) with respect to the main variable (in this case x), and the straight dashed line similarly but with respect to the dashed balloon expression (the inner function of the composite which is subject to the chain rule).
Probably best to think of it like...
... then zoom in (mentally at least) on the question of differentiating e to the 3x...
... and use the bottom row to fill the blank in the previous. But if you want to put both in one picture... well, scientists here at the Laboratoire Ballon have struggled to come up with...
... but improvements gratefully received.
_________________________________________
Don't integrate - balloontegrate!
Balloon Calculus; standard integrals, derivatives and methods
Balloon Calculus Drawing with LaTeX and Asymptote!
$\displaystyle y= sin(e^{3x})$
Let v= 3x and $\displaystyle u= e^v$ so $\displaystyle y= sin(u)$
The derivative of y= sin(u) with respect to u is cos(u).
The derivative of $\displaystyle u= e^v$ with respect to v is $\displaystyle e^v$.
The derivative of v= 3x with respect to x is 3.
Now put them all together- by the chain rule,
$\displaystyle \frac{dy}{dx}= \frac{dy}{du}\frac{du}{dv}\frac{dv}{dx}$
With practice, you can learn to do those without having to write out the substitituions:
"The derivative of sine is cosine so the derivative of $\displaystyle cos(e^{3x})$ is $\displaystyle sin(e^{3x})$ times the dervative of $\displaystyle e^{3x}$ which is $\displaystyle e^{3x}$ times the derivative of 3x, which is 3"