Amadeus Interview Question

scenario based coding question , oops