(N/A) Consider a body of mass $m$ at a point $P$ inside a tunnel dug through the center of the Earth. Let the distance of point $P$ from the center of the Earth be $y$. According to the shell theorem,the gravitational force on the body at distance $y$ from the center is due only to the mass of the Earth contained within a sphere of radius $y$.
The mass of this inner sphere is $M' = \rho \cdot \frac{4}{3} \pi y^3$,where $\rho$ is the density of the Earth. Since $\rho = \frac{M}{\frac{4}{3} \pi R^3}$,we have $M' = M \left( \frac{y^3}{R^3} \right)$.
The gravitational force on the body is $F = -\frac{G M' m}{y^2} = -\frac{G M m y^3}{R^3 y^2} = -\left( \frac{G M m}{R^3} \right) y$.
Since $g = \frac{G M}{R^2}$,we can write $F = -\left( \frac{mg}{R} \right) y$.
This force is of the form $F = -ky$,where $k = \frac{mg}{R}$ is a constant. Since the restoring force is directly proportional to the displacement $y$ and directed towards the center,the body executes simple harmonic motion.