Ignoring the slightly longer trip by the cart, both travel the same distance during the same time interval. Thus they both have the same average speeds.