When they say f(-1) = -5 they mean the point (-1, 5) is on the line.
When they say f(3) = 4 they mean the point (3, 4) is on the line.
Find the slope: m = (y2-y1)/(x2-x1) = (4-5)/(3-(-1)) = -1/4
then we replace m, and one of the given points in the slope-point equation of a linear function:
(y-4)=-1/4(x-3) then:
and it would be the final answer, you can check f(-1)=5 and f(3)=4 to verify that it's the correct function.