Answer
8
Work Step by Step
Let's apply the equation $f=\frac{1}{2\pi}\sqrt {\frac{k}{m}}$ for both situations.
The first object attached to the spring -
$f=\frac{1}{2\pi}\sqrt (\frac{k}{m})$ ; Let's plug known values into this equation.
$12\space s^{-1}=\frac{1}{2\pi}\sqrt {\frac{k}{M_{1}}}=>M_{1}=\frac{k}{4\pi^{2}\times12^{2}s^{-2}}=\frac{k}{576\pi^{2}s^{-2}}-(1)$
Similarly, (Both objects attached to the spring)
$M_{1}+M_{2}=\frac{k}{4\pi^{2}\times4^{2}s^{-2}}=\frac{k}{64\pi^{2}s^{-2}}-(2)$
$(2)\div(1)=>$
$\frac{M_{1}+M_{2}}{M_{1}}=\frac{\frac{k}{64\pi^{2}s^{-2}}}{\frac{k}{576\pi^{2}s^{-2}}}$
$1+\frac{M_{2}}{M_{1}}=\frac{576}{64}$
$\frac{M_{2}}{M_{1}}=9-1=8$