f(17)=12

f(7)=6
f(x)=?

f(x) = 3/5 (x+3)

f(x) = 3/50 (x-7)^2 + 6
or any of a host of other functions.
If you want a straight line, use the first one.