Use the pythagorean theorem to find the hypotenuse of the right triangle. The formula is A^2 + B^2 = C^2 which one subsituted with the values you gave would look like 27^2 + 22^2 = C^2. I'll do the steps below.
27^2 + 22^2 = C^2
729 + 484 = C^2
1213 = C^2
35 = C
Tell me if the explanation wasn't sufficent enough.