You can always draw a right-angled triangle where the sloped side c is the line between the two points of interest, and a and b are the sizes of the horizontal and vertical lines.
To find the surface area of a prism (or any other geometric solid) we open the solid like a carton box and flatten it out to find all included geometric forms. To find the volume of a prism (it doesn't matter if it is rectangular or triangular) we multiply the area of the base, called the base area B, by the height h.