The perpendicular bisector of AB contains the midpoint, M, of AB.
M = ((-2+5)/2, (2+4)/2) = (1.5, 3)
The slope of the perpendicular bisector of AB is the negative reciprocal of the slope of AB.
So, since slope of AB = (4-2) / (5-(-2)) = 2/7, the perpendicular bisector has slope -7/2.
Equation of perpendicular bisector: y - 3 = (-7/2)(x - 1.5)
Simplify to get y = (-7/2)x + (33/4)