Let displacements of masses $m_1$ and $m_2$ are $x_1$ and $x_2$, respectively.
Total elongation of spring is $x=x_1+x_2$.
So, when spring snaps back, pull on each of mass is
$F=-k x$
Hence, by second law equation for $m_1$ and $m_2$ are
$m_1 a _1=-k x \Rightarrow m_1 \frac{d^2 x_1}{d t^2}=-k x$
and $m_2 a_2=-k x \Rightarrow m_2 \frac{d^2 x_2}{d t^2}=-k x$
Now, from $x=x_1+x_2$, we have
$\frac{d^2 x}{d t^2}=\frac{d^2 x_1}{d t^2}+\frac{d^2 x_2}{d t^2}$
$\Rightarrow \quad \frac{d^2 x}{d t^2}=\frac{-k}{m_1} x+\frac{-k}{m_2} x$
$\Rightarrow \quad \frac{d^2 x}{d t^2}=-k\left(\frac{1}{m_1}+\frac{1}{m_2}\right) x$
Hence, time period of oscillation is
$T=\frac{2 \pi}{\omega}=2 \pi \sqrt{\frac{1}{k}\left(\frac{m_1 m_2}{m_1+m_2}\right)}$

| Column $I$ | Column $II$ |
| $(A)$ Potential energy of a simple pendulum (y axis) as a function of displacement ( $\mathrm{x}$ axis) | $Image$ |
| $(B)$ Displacement (y axis) as a function of time (x axis) for a one dimensional motion at zero or constant acceleration when the body is moving along the positive $\mathrm{x}$-direction | $Image$ |
| $(C)$ Range of a projectile (y axis) as a function of its velocity ( $\mathrm{x}$ axis) when projected at a fixed angle | $Image$ |
| $(D)$ The square of the time period (y axis) of a simple pendulum as a function of its length ( $\mathrm{x}$ axis) | $Image$ |



