f(12)=15 and f(5)=6 f(x)=

Assuming it's a line, use the two-point form of the equation

Letting y = f(x),

(y-15)/(x-12) = (6-15)/(5-12) = 9/7

y-15 = 9/7 (x-12)
y = (9/7)x - 3/7