A linear relationship means that you can write C = m*d + k where m and k are constants to be found from the information you are given.
From May: 360 = m*500 + k ...(1)
From June: 440 = m*900 + k ...(2)
Re-write (1) as k = 360 - m*500 and put this into (2)
440 = m*900 + 360 - m*500
Rearrange and simplify:
440 - 360 = m*400
80 = m*400
m = 80/400 = 0.2 ...(3)
Use (3) in (1) (or (2) if you prefer)
360 = 0.2*500 + k
k = 360 - 0.2*500 = 360 - 100 = 260
So, in general
C = 0.2*d + 260
so when d = 1200 the cost is
C = 0.2*1200 + 260 = 500
Cost of driving 1200 miles is $500