Explanation:
x = number of games played
c = total cost of game session
x = (c - 5)/1.25
we need to deduct the R 5 entrance fee from the total price (as this has to be paid, even if he did not pay a single game in there).
and for the remaining amount we check how often the price of 1 game fits into this renaming amount. and then we know the number of games he played.
in our specific situation c = 26.25
x = (26.25 - 5)/1.25 = 21.25/1.25 = 17
Melvin played 17 games.