Imagine a scenario, in which pilot lands with -673 feet/minute. ( absolute value is 673 , using abs() makes it easier to handle things logically )
It will pass the first "if" check we put in 'cause we are checking anything above -500 feet/minute.
Then it will reach the multiplier part, here our new $amount will be calculated like this $amount = 250 * (673 / 500) , means simply $amount = 250 * 1.346 , result will be rounded so it will be 337 ($ or Eur, your selected currency)
The next step will prepare the proper Expense array to pass back, charge_to_user is true, this means that the amount will be taken from pilot's pocket
In another flight, another pilot lands with -499 feet/minute, then nothing will happen and no expense will be charged to pilot 'cause it will be captured by the "if" check and it can not proceed further.
Now, after the example above and basic explanation here, it is up to you and your imagination + skills