add the flight instance to the ways array if from=A and to=A