Finding the length of a segment using the Pythagorean Theorem