If one is travelling by plane on a flight that is more than 7 hours, he should pray on it right?

If so how do I pray? Does it suffice in me asking the pilots the direction towards Mecca?

Yes one must pray on the airplane if by the time he arrives his destination the time for prayer will have expired. You can do the following:

1- Ask for the direction of Mecca. Usually you can figure that out from the flight route map shown on the screen.

2- If you can, find a corner and stand up and pray with full ruku’ and sujud.

3- If you are unable to do so, pray in your seat but try to face Mecca.