On this one, there is a consistent difference between the f(x) values:
19-31 = -12
7-19 = -12
-5-7 = -12
-17-(-5) = -12
Since that difference is consistent, this is a linear function.
We also know (from the table) that f(0)=31, so we can use the slope-intercept form of a line:
f(x) = -12x +31
Note: The -12 is that constant difference from above, which is the slope.