Write the correct form. By the time they ___ (to arrive) at the airport, their plane had already taken off.