distance between the points can be found by this formula

where (x1,y1) and (x2,y2) are coordinates points,
============================================
what else u want in this que regarding right triangle is not clear as ur picture looking incomplete?