AP BOX AND SPRING PROBLEM 2

A block of mass M is resting on a hroizontal, frictionless table and is attached as shown above to a relaxed spring of spring constant K. A second block of mass 2M and initial speed Vo collides with and sticks to the first block. Develop expresssions for the following quantities in terms of M, K, and Vo.
A) V, the speed of the blocks immediately after impact.
B) X, the maximum distance the spring is compressed.
C) T, the period of the subsequent simple harmonic motion