I've got this:
A wagon of mass $M$, initially at rest, can move horizontally along a frictionless track. When $t = 0$, a force $F$ is applied to the cart. During the acceleration of M by the force $F$, a small mass m slides along the wagon from the front to the rear. The coeﬃcient of kinetic friction between $m$ and $M$ is $µ_k$, and it is assumed that the acceleration of M is suﬃcient to cause sliding.
Write two equations of motion, one for m and one for M, and show that they can be combined to give the equation of motion of the mass center of the system of two bodies.
Find the displacement of M at the time when m has moved a distance l along the cart.
I don't know how to place the axis so that I can calculate the center of mass. Also, I found only one equation that includes both masses (based on Newton's second law) and I can't figure it out how to get another equation.