Answer
\[\begin{align}
& \mathbf{a}.\text{ }f'\left( g\left( x \right) \right)g''\left( x \right)+{{\left( g'\left( x \right) \right)}^{2}}f''\left( g\left( x \right) \right) \\
& \mathbf{b}.=\left( 36{{x}^{2}}+10 \right)\cos \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \\
& \text{ }-{{\left( 12{{x}^{3}}+10x \right)}^{2}}\sin \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \\
\end{align}\]
Work Step by Step
\[\begin{align}
& \mathbf{a}\text{.} \\
& \frac{d}{dx}\left[ f\left( g\left( x \right) \right) \right] \\
& \text{By the chain rule} \\
& \frac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=f'\left( g\left( x \right) \right)g'\left( x \right) \\
& \text{Calculate the second derivative} \\
& \frac{{{d}^{2}}}{d{{x}^{2}}}\left[ f\left( g\left( x \right) \right) \right]=\frac{d}{dx}\left[ f'\left( g\left( x \right) \right)g'\left( x \right) \right] \\
& \text{Use the product rule} \\
& \frac{{{d}^{2}}}{d{{x}^{2}}}\left[ f\left( g\left( x \right) \right) \right]=f'\left( g\left( x \right) \right)\frac{d}{dx}\left[ g'\left( x \right) \right]+g'\left( x \right)\frac{d}{dx}\left[ f'\left( g\left( x \right) \right) \right] \\
& =f'\left( g\left( x \right) \right)g''\left( x \right)+g'\left( x \right)f''\left( g\left( x \right) \right)\frac{d}{dx}\left[ g\left( x \right) \right] \\
& =f'\left( g\left( x \right) \right)g''\left( x \right)+g'\left( x \right)f''\left( g\left( x \right) \right)g'\left( x \right) \\
& =f'\left( g\left( x \right) \right)g''\left( x \right)+{{\left( g'\left( x \right) \right)}^{2}}f''\left( g\left( x \right) \right) \\
& \\
& \mathbf{b}.\frac{{{d}^{2}}}{d{{x}^{2}}}\left( \sin \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \right) \\
& \text{Let }g\left( x \right)=3{{x}^{4}}+5{{x}^{2}}+2\text{ and }f\left( x \right)=\sin x,\text{ then} \\
& g'\left( x \right)=12{{x}^{3}}+10x \\
& g''\left( x \right)=36{{x}^{2}}+10 \\
& \\
& f\left( g\left( x \right) \right)=\sin \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \\
& \frac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=\frac{d}{dx}\left[ \sin \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \right] \\
& \text{The second derivative is} \\
& \underbrace{f'\left( g\left( x \right) \right)g''\left( x \right)+{{\left( g'\left( x \right) \right)}^{2}}f''\left( g\left( x \right) \right)}_{\Downarrow } \\
& =\cos \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right)\left( 36{{x}^{2}}+10 \right) \\
& +{{\left( 12{{x}^{3}}+10x \right)}^{2}}\left( -\sin \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \right) \\
& \text{Simplifying} \\
& =\left( 36{{x}^{2}}+10 \right)\cos \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \\
& -{{\left( 12{{x}^{3}}+10x \right)}^{2}}\sin \left( 3{{x}^{4}}+5{{x}^{2}}+2 \right) \\
\end{align}\]