Expression miles driven in range with cost

Hi,

I have a Math problem below really stretches beyond my linear math algebraic equation (y=mx +c) understanding of 2 sets of specific number data. The problem, given a range of data verses another set of specific number. Please help if you have the solution. Many thanks and appreciate.

Cassidy rented a truck to move 120 miles from Ithaca to Attica. The table shows the cost for renting the truck based on the number of miles driven.

Miles driven Cost ($)

0-9 25

10-19 31

20-29 37

30-39 43

40-49 49

Write an expression to determine the cost of renting the truck for m miles.