I'd start by drawing a free body diagram on body B.
By intuition the angle that the spring forms with the vertical (45° I'd say) will not change with time. You know that the acceleration occurs only vertically.
Maybe that can help you.
What is the maximum velocity of slider B if the system is released from rest from x = y. Motion is in the vertical plane. Assume friction is negligible. The sliders(A and B) have equal masses.
Answer: 0.31 m/s
I am unable to do this(i tried the concepts of mechanics which i know of like energy conservation etc. but to no avail). Can anyone help?