Hello
1) The work W is calculated as the product between the force F applied to the cart and the distance d covered by the cart:

2) The force is the product of the mass m of the cart and its acceleration a:

If we use this into the formula of the work, we get

3) The cart is moving by accelerated motion. For this kind of motion, we have the following relationship:

where 

 and 

 are the final and the initial velocity of the cart. 
Re-arranging we have

4) Therefore, we can subsitute 

 into the original formula of the work, and we get
