Here is how I would do the second one:
find slope = rise/run = y1-y2 / x1-x2 = (5- -7)/(2-6) = 12/-4 = -3
Perpindicular slope is - 1/(-3) = 1/3
Find the midpoint of AB
x (2+6)/2 = 4
y (5+ -7)/2 = -1 so midpoint is (4,-1) and slope is 1/3
line is y = 1/3 x + b sub in your midpoint to calculate 'b'
-1 = 1/3 (4) + b results in b = -7/3
y = 1/3 x - 7/3
Here is a picture:
