Slope=(f(-5)-f(7))/(-5-7)=(2-(-7))/-12=-9/12=-¾.
Now we have the slope, we can write:
f(x)-f(-5)=-¾(x-(-5)),
f(x)-2=-¾(x+5),
f(x)-2=-3x/4-15/4,
f(x)=-3x/4-15/4+2,
f(x)=-3x/4-7/4.
Or we could use the other point (7,f(7))=(7,-7):
f(x)-f(7)=-¾(x-7),
f(x)-(-7)=-3x/4+21/4,
f(x)+7=-3x/4+21/4,
f(x)=-3x/4+21/4-7,
f(x)=-3x/4-7/4.
If you find f(x), f(-5), f(7) confusing, then use y=f(x).
This gives you the points (-5,2) and (7,-7) from which you can find the slope. Then replace f(x) with y when you work out the equation of the line joining the points.