Not all riders are the same. Some riders will be stronger, more experienced than the other. Sometimes they are evenly matched. The stronger rider can stay up longer. For how much longer, depends. Terrain makes a difference. Some riders are better on hills.
In any long ride, there is the ebb and flow of energy and its different for each rider. If one needs more time for a recovery, the other will pull just a bit longer. Or even stop and take a rest. Eat some bars and have a drink.