use pythagorean theorem
a^2+b^2=c^2
first find the difference of between the 2 points to find the legnth of the legs
distance between 2 and 5=3
distance between 3 and 8=5 so
3^2+5^2=c^2
9+25=c^2
34=c^2
√34=c
the ligit formula is
[tex]c= \sqrt{(x1-x2)^2+(y1-y2)^2} [/tex]