First part - This is tricky because momentum is a vector quantity. In this case there are both vertical and horizontal momenta. The vertical momentum (being considered in the first part) is NOT conserved because there are outside, unbalanced forces acting on the system vertically. So, they want you to calculate the impulse on the box (mass times change in velocity of the box) to determine (by Newton's 3rd Law) the impulse on the tracks (don't forget direction). Again, since there are other forces on the track, this momentum is not conserved.
Second part - Since we can ignore friction, there are no outside horizontal forces acting on the system, so the horizontal momentum WILL be conserved. Consider ONLY the horizontal momenta (non-zero for the cart and zero for the bag initially), and use your equation to solve for the final horizontal momentum of the system to find the final velocity of the trolley/box.