In this example, you are asking for the cab companies to calculate an average fare which will allow them to operate at a loss during the night. The cab company is taking the risk that their assumptions about how much to charge during the day will offset their losses at night.
However, for this scenario, why does a cab company need to take on this risk? Why is the risk of not having a cab at a cheap price not borne by the person who needs it at 3AM? This seems like a problem that is sufficiently solved by the market, where cabs will charge appropriate pricing to make it worth their while, and if another company finds they can correctly price their fares so that they can offer the same pricing day and night, then customers will choose them.
The municipal government mandates that the company who wins the bid for the airport franchise, is committed to always having a cab at the airport. The public good is served above the expediencies of corporate profit.
However, for this scenario, why does a cab company need to take on this risk? Why is the risk of not having a cab at a cheap price not borne by the person who needs it at 3AM? This seems like a problem that is sufficiently solved by the market, where cabs will charge appropriate pricing to make it worth their while, and if another company finds they can correctly price their fares so that they can offer the same pricing day and night, then customers will choose them.