You will have to do this for every flight.
What you are looking for is the smallest (most recent) on-time that is still later than the current off-time, and where the helicopter_id is the same.
something like:
SELECT min(on_time)
FROM table
WHERE helicopter_id = $your_heli_id
AND on_time> $the_off_time_from_last_flight