1) First we need to find midpoint M of segment AB.
... M = (A+B)/2 = ((2+8)/2, (0+4)/2) = (5, 2)
Then vector AB is B-A = (8-2, 4-0) = (6, 4)
and vector PM is P-M = (3-5, 5-2) = (-2, 3)
The latter has slope that is 3/-2 = -3/2. The former has slope that is 4/6 = 2/3.
The product of these slopes is -1, indicating these vectors are perpendicular.
2) Vector PA is P-A = (3-2, 5-0) = (1, 5).
Vector PB is P-B = (3-8, 5-4) = (-5, 1).
The lengths of both of these vectors are √(1²+5²) = √26.