Let there be two blocks $m_1$ and $m_2$ both are attched with a spring and have a velocity $v_1$ and $v_2$ respectively . They are attached to same spring.
Now I have some doubts related to it.
With respect to centre of mass, how these blocks are doing SHM.
And in ground frame can we use energy conservation like this $$(1/2)m_1v_1^2+(1/2)m_2v_2^2=(1/2)kx^2$$ Where $x$ is maximum compression in spring. Where k is spring constant
Can we use concept of reduce mass in such situations