A small body of mass m_1 slides down a rough inclined plane…
A small body of mass $m_1$ slides down a rough inclined plane of angle $\alpha$ and length $l$, which is fixed on a cart; the cart with the incline has mass $m_2$. The coefficient of friction between the body and the incline is $\mu$ (small enough for the body to slide); the cart rolls without friction. The system starts from rest. How far does the cart move while the body slides from the top of the incline to the bottom?
Explanation of Method
How far a cart moves while a body slides down its incline.
Step 1: The centre of mass stays put horizontally
The friction between body and incline is internal, and the ground exerts no horizontal force. Everything starts at rest, so the horizontal position of the centre of mass does not change:
\[ m_1\,\Delta x_1 + m_2\,\Delta x_2 = 0. \]
Step 2: Displacements
Relative to the cart the body moves $l\cos\alpha$ horizontally. If the cart moves back by $s$, the body moves $l\cos\alpha - s$ relative to the ground: $m_1\,(l\cos\alpha - s) = m_2 s$.
\[s = \frac{m_1\,l\cos\alpha}{m_1 + m_2}\]
Friction affects only how long it takes, not how far the cart moves.
Check
Very heavy cart ($m_2 \gg m_1$): $s \to 0\ \checkmark$; very light cart: $s \to l\cos\alpha$, the body stays in place and the cart slides out from under it $\checkmark$
Result
\[\boxed{\,s = \frac{m_1\,l\cos\alpha}{m_1 + m_2}\,}\]
Remark
About the original solution. It took the body's acceleration from a fixed incline and the push on the cart as $m_1g(\sin\alpha - \mu\cos\alpha)\cos\alpha$, which ignores that the incline itself accelerates (this changes the normal force and the relative motion). Its result $s = m_1 l\cos\alpha/m_2$ has $m_2$ instead of $m_1 + m_2$ in the denominator, and would even exceed $l\cos\alpha$ for a light cart, which is impossible.