I'm trying to understand the answer to the problem in this screenshot
The goal is to use the chain rule to find the derivative of $$e^{\sin(x^2)}$$ As seen in the screenshot, the correct answer is $$2x e^{\sin(x^2)}\cos(x^2)$$
From my understanding the chain goes:
$$f'(g'(h(x))) h'(x) g'(x) $$
but I am not too sure how it gets $\cos(x^2) $
Your statement of the chain rule is incorrect. The derivative of $f(g(h(x)))$ with respect to $x$ is $f'(g(h(x)))g'(h(x))h'(x)$.
In your case, $f(x) = e^x$, $g(x) = \sin(x)$, and $h(x) = x^2$, so $$f(g(h(x))) = f(g(x^2)) = f(\sin(x^2)) = e^{\sin(x^2)}$$
To apply the chain rule, we need the derivatives of $f$, $g$, and $h$, which are: $$\begin{aligned} f'(x) &= e^x \\ g'(x) &= \cos(x) \\ h'(x) &= 2x \\ \end{aligned}$$ Then the three factors of the chain rule are: $$\begin{aligned} f'(g(h(x)) &= f'(\sin(x^2)) = e^{\sin(x^2)} \\ g'(h(x)) &= \cos(x^2) \\ h'(x) &= 2x \\ \end{aligned} $$ Multiplying these together, we get the final answer: $$f'(g(h(x)))g'(h(x))h'(x) = 2x e^{\sin(x^2)}\cos(x^2)$$ which matches the correct answer at your link.