Y2-Y1 over X2-X1 to find slope first
-7-(-2)/4-5=-5/-1 or 5 since a negative and a negative makes a positive
Your slope is 5 now you use mid point formula to find your actual equation
Y-Y1=M(X-X1)------Sub in 5 for M in mid point formula--your first cord points (5,-2) will be used
Y-(-2)=5(X-5)----a negative and a negative makes a positive -(-2) Y+2=5(X-5)--then you distribute 5 into X and -5 which will be 5X-25
now you should have Y+2=5X-25
Subtract 2 from both sides and then you should have your equation passing through (5,-2) and (4,-7)
Y=5X-27