when the block achieves maximum compression of the spring, both the block and platform are at the same velocity, $v_1$ ...

momentum is conserved ...

$mv_0 = (m+M)v_1 \implies v_1 = \dfrac{mv_0}{m+M} = \dfrac{v_0}{41}$

all forces are conservative, so energy is conserved ...

$\dfrac{1}{2}mv_0^2 = \dfrac{1}{2}(m+M)v_1^2 + \dfrac{1}{2}k(x_{max})^2$

substituting given values for $m$, $M$, and $k$ ...

$x_{max} = \dfrac{v_0}{5\sqrt{82}}$

after the instant of maximum spring compression, momentum is conserved ...

$(m+M)\cdot \dfrac{v_0}{41} = mv_2 + Mv_3$

where $v_2$ is the cube's final velocity and $v_3$ is the platform's final velocity ... note both velocities are relative to an outside observer.

since energy is conserved, opening speed after the collision = closing speed before the collision ...

$v_3-v_2 = v_0 - 0$

$v_3 = v_0+v_2$

$(m+M)\cdot \dfrac{v_0}{41} = mv_2 + M(v_0+v_2)$

$\dfrac{v_0}{2} = 20.5v_2 + 20v_0$

$v_2 = -\dfrac{39v_0}{41} \implies v_3 = \dfrac{2v_0}{41}$