If only mass m2 is present the extension of spring l is given by m2g=kl
⇒l= m2g/k , where k=Spring constant
Now with m1 and m2 the extension be l ′ (m1 +m2 )g=kl ′
l ′ = (m1 +m2/k)g-m2g/k
⇒ A = m1g/k
Now, if m2 is removed the angular frequency of oscillation ω= \(\sqrt{\frac{k}{m_2}}\) (This is same as the case of m2 attach to spring)