The amount of work is the same, but the work done on the cart is positive while the work done on the bucket is negative.
Work Step by Step
Consider equation 6.2. The rope tension pulls the cart in the same direction as its displacement, and does positive work W on the cart. The rope tension, of the same magnitude, pulls the bucket in a direction exactly opposite to its displacement (it moves the same distance as the cart does), so it does work of –W.