The velocity v of the attached system is conserved by momentum: (m+M)v=mv0.
Therefore, v=mv0/(M+m) At this time, the energy of the system e = (m+m) v2/2 = (mv0) 2/2 (m+m) = ka 2/2 ... (2).
From (1)(2):
A0:A=√(M+m):√m