using the pythagorean theorem we get 3 squared + 4 squared = x squared
squareroot of x squared is 5
or you can divide the smallest side with 3 (tat's 1)
the medium sized side with 4 (also 1)
and then, if the two previous are the same, you take the number (3/3 in this case) and take it times 5 (in this case 5)
the second works on egyptian triangles, the first on every triangle with an angle of 90 degrees