Total energy of particle executing SHM is = 1/2 mw2A2
for 1 st particle E1 = 1/2 m (10)2(4)2
for 2nd particle E2 = 1/2 m (w)2(5)2
E1 =E2
so w = 10*4/5
=8