Explanation:
the function is
ride cost c = mile rate r × miles m + flat rate f
c = r×m + f
now let's put the values in we know and solve for r and f :
9 = r×3 + f
17 = r×7 + f
now, since one term is the same in both equations, we use a simple trick for speed, and we subtract the whole first equation from the second :
17 = r×7 + f
- 9 = r×3 + f
-------------------
8 = r×4 + 0
r = 8/4 = $2
9 = 2×3 + f = 6 + f
f = $3
the first rate is $3, and it costs $2 per mile.