.
This problem admits a REMARKABLY simple solution, which does not require, practically, ANY calculations.
Notice that the side AB is vertical of the length 5 - (-1) = 6 units
and the side AC is horizontal with the length 3 - (-5) = 8 units.
So, the triangle ABC is a right angled triangle with the right angle A and the legs of 6 and 8 units.
It is a classic (3,4,5) right angled triangle with the hypotenuse BC of 10 units long.
Hypotenuse is the longest side.
ANSWER. The length of the longest side is 10 units.
Solved, explained and completed.