I am told by a friend, I am not sure

There are time Airlines charging ( any Airline QR, EK ..)
3000 to London and 2700 to Kochi ( India ) which is
4 hours flight. ( On a same day )

This is a doubt --- how the airline tickets are priced ? Is it not on the distance in Km ? or any other criteria ?