Answer
\[\begin{align}
& \mathbf{a}\text{.}\frac{{{d}^{2}}y}{d{{t}^{2}}}=-{{y}_{0}}\left( \frac{k}{m} \right)\cos \left( t\sqrt{\frac{k}{m}} \right) \\
& \mathbf{b}.\text{ }\frac{{{d}^{2}}y}{d{{t}^{2}}}=-\frac{k}{m}y \\
\end{align}\]
Work Step by Step
\[\begin{align}
& \text{Let }y={{y}_{0}}\cos \left( t\sqrt{\frac{k}{m}} \right) \\
& \text{a}\text{.} \\
& \text{Differentiate both sides with respect to }t \\
& \frac{dy}{dt}=\frac{d}{dt}\left[ {{y}_{0}}\cos \left( t\sqrt{\frac{k}{m}} \right) \right] \\
& \frac{dy}{dt}={{y}_{0}}\frac{d}{dt}\left[ \cos \left( t\sqrt{\frac{k}{m}} \right) \right] \\
& \frac{dy}{dt}=-{{y}_{0}}\sin \left( t\sqrt{\frac{k}{m}} \right)\frac{d}{dt}\left[ \left( t\sqrt{\frac{k}{m}} \right) \right] \\
& \frac{dy}{dt}=-{{y}_{0}}\sqrt{\frac{k}{m}}\sin \left( t\sqrt{\frac{k}{m}} \right) \\
& \text{Calculate the second derivative} \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-{{y}_{0}}\sqrt{\frac{k}{m}}\frac{d}{dt}\left[ \sin \left( t\sqrt{\frac{k}{m}} \right) \right] \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-{{y}_{0}}\sqrt{\frac{k}{m}}\left[ \cos \left( t\sqrt{\frac{k}{m}} \right) \right]\sqrt{\frac{k}{m}} \\
& \text{Simplifying} \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-{{y}_{0}}{{\left( \sqrt{\frac{k}{m}} \right)}^{2}}\cos \left( t\sqrt{\frac{k}{m}} \right) \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-{{y}_{0}}\left( \frac{k}{m} \right)\cos \left( t\sqrt{\frac{k}{m}} \right) \\
& \\
& \text{b}\text{.} \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-{{y}_{0}}\left( \frac{k}{m} \right)\cos \left( t\sqrt{\frac{k}{m}} \right) \\
& \text{Rewrite} \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-\frac{k}{m}\left( {{y}_{0}}\cos \left( t\sqrt{\frac{k}{m}} \right) \right) \\
& \text{Where }{{y}_{0}}\cos \left( t\sqrt{\frac{k}{m}} \right)=y,\text{ then} \\
& \frac{{{d}^{2}}y}{d{{t}^{2}}}=-\frac{k}{m}y \\
\end{align}\]