Doubt from SHM

Please solve question number 7, the mass 1kg and 4 kg one