Elastic Collision And Momentum The question I am working on is, "Two blocks are free to slide along the friction-less wooden track shown below. The block of mass $m_1 = 4.98~kg$ is released from the position shown, at height $h = 5.00~m$ above the flat part of the track. Protruding from its front end is the north pole of a strong magnet, which repels the north pole of an identical magnet embedded in the back end of the block of mass $m_2 = 9.40~kg$, initially at rest. The two blocks never touch. Calculate the maximum height to which $m_1$ rises after the elastic collision."

This question comes from webassign. On webassign they have a feature called "Watch It;" this feature allows you to see a person solve a problem nearly similar to this one. I feel as though there is an error in what the person says in the video. The person says that the mechanical energy of the block-earth system is conserved, but that wouldn't be true; if we were looking at the block-block system--that is, $m_1$ and $m_2$--the mechanical energy would be conserved. By looking at just the block-earth system, there would be a loss in kinetic energy, because when the two blocks "collide," they apply a force over a distance(work), causing a change in kinetic energy of each block, because the kinetic energy of the moving block is transferred into the other block, which is why the first block doesn't return to its initial height. Is this correct? If not, what am I misunderstanding?
As a result of this contention with what the person said in the video, I am not very certain on how to solve this problem.
EDIT (attempt to solve): 
Energy analysis:
$m_1:$ $PE_i=mgh=KE_f$, where $h$ is the height from which it drops.
$KE_i=0~J$; $PE_f=mgh_0$, where $h_0$ is the height is rises to after the collision
$m_2:$ $KE_i=PE_i=PE_f=0~j$; $KE_f=\frac{1}{2}m_2v^2_{f,2}$
Momentum Analysis:
$m_1:$ $\vec{p}_{i,1}=m_1\vec{v}_{i,1}$; $\vec{p}_{f,1}=m_1\vec{v}_{f,1}$
$m_2:$ $\vec{p}_{i,2}=m_2\vec{v}_{i,1}$; $\vec{p}_{f,2}=m_2\vec{v}_{f,2}$
When I set up an equation for change in mechanical energy, and an equation for conservation of momentum, I get two equations, with a lot of unknowns. What did I do wrong?
 A: It's not clear to me what "block-earth" system is supposed to mean, either, particularly when there are two blocks.  The key word in the problem is that they say it's an elastic collision.  Therefore, the total momentum and energy of the two blocks are conserved quantities.  That's all one really needs to know in order to solve the problem.
Edit: a full analysis of the problem.  Prior to collision, block 1 has $E = m_1 gh$ and block 2 has no energy.  Just prior to collision, all this energy is kinetic, so $p^2/2m_1 = m_1 gh \implies p = m_1\sqrt{2gh}$.
After the collision, total momentum and energy must be conserved.
$$\begin{align*} p_1 + p_2 &= p \\
\frac{(p_1)^2}{2m_1} + \frac{(p_2)^2}{2m_2} &= E\end{align*}$$
A straightforward way to attack this system of equations is to solve the first by $p_2 = p-p_1$ and substitute into the second, yielding
$$m_2 (p_1)^2 + m_1 (p^2 - 2pp_1 +[p_1]^2) = 2 m_1^2 m_2 gh$$
Solve this for $p_1$, the momentum of block 1 after the collision, using the usual methods for solving quadratic equations.  Once you have the momentum, you should be able to find the final height as the block goes back up the ramp.
A: Since the blocks are on a frictionless surface, they don't interact with the Earth, so it doesn't make much sense to talk about the "block-earth" system. Within the context of this block-block system, the mechanical energy is always conserved.
In terms of equations, at the point of collision we have
$m_{1}v_{10}=m_{1}v_{1}+m_{2}v_{2}$
$\frac{1}{2}m_{1}v_{10}^{2}=\frac{1}{2}m_{1}v_{1}^{2}+\frac{1}{2}m_{2}v_{2}^{2}$
Here $v_{10}=\sqrt{2gh}$ (the velocity of the first block at the bottom of the ramp), with the positive direction to the right. Some algebra will let you find expressions for $v_{1}$ and $v_{2}$. Looking at a few limiting cases is helpful in visualizing the motions of the blocks.
In the case that $m_{1}=m_{2}$ (blocks of equal mass), the first block completely stops, while the second block moves at $v_{2}=v_{10}$. This is the same thing that happens in billiards when the cue ball directly strikes another ball, and can also be seen in a Newton's cradle.
In the case that $m_{1}>>m_{2}$, the first block will not lose much momentum, and its final velocity will be very close to its initial velocity (in the limit of $\frac{m_{1}}{m_{2}}\rightarrow\infty$, the second block is massless and $v_{1}=v_{10}$).
Finally, in the case that $m_{1}<<m_{2}$, the second block will not gain much velocity, and the first block will rebound most of the way back up the ramp (in the limit of $\frac{m_{2}}{m_{1}}\rightarrow\infty$, the second block can be thought of as an immovable wall and the first block rebounds from it at $v_{1}=-v_{10}$).
