For the first question how much to drive 50 miles, let the amount of money be "n".
n = $24 x ($1.25x50)
n is 24 plus 62.50
n is $86.50
For the second question how many miles if I paid 105.25. Let the number of miles be 'm'
105.25 = 24 + 1.25m
91.25 = 1.25m
m = 73 miles