Note that whenever x increases by 1, y decreases by 1.
Similarly, when x increases by 3, y decreases by 3.
Hence, all four points lie on the same line.
We will use the slope formula to find that line:
(y - 7) / (x - 3) = (8 - 7) / (2 - 3)
(y - 7) / (x - 3) = 1 / -1
(y - 7) / (x - 3) = -1
y - 7 = -(x - 3)
y - 7 = -x + 3
y = -x + 10
Hence, the function between the two is f(x) = -x + 10