B. cart B
Step-by-step explanation:
The acceleration of each cart is given by Newton's second law:


where F is the force applied, a is the acceleration and m is the cart's mass.
The force F applied is the same for the two carts, however the mass of cart A (mA) is twice than the mass of cart B (mB), so we can rewrite the two accelerations:


we see that the acceleration of cart B is twice the acceleration of cart A, therefore cart B will move faster and will win the race.