A median of a triangle is a segment drawn a vertex to the midpoint of the opposite side.

AD = BD

5x - 2 = 2x + 7

3x = 9

x=3

AD + BD = AB

5(3) - 2 + 2(3) + 7=26

Did you mean to say the slope of the altitude =4?

The product of the two slopes must be -1 since the lines are perpendicular.