The "Rides" application (AKA Taxi/Capooling) would allow flows below:
The scenario above might be extended to cover more cases like these: