Amadeus interview question

scenario based coding question , oops