You are going on a one-way indirect flight trip that includes billions an unknown very large number of transfers.
Put in two Hashes: to_end = src -> des; to_beg = des -> src
Pick any airport as a starting point S.
while(to_end[S] != null)
S = to_end[S];
S is now your final destination. Repeat with the other map to find your starting point.
Without properly checking, this feels O(N), provided you have a decent Hash table implementation.