Pythagorean theorem.
a^2+b^2=c^2
This means that the square of the length of the 2 legs of a right triangle added together = the square of the length of the hypotenuses or diagonal.
If you know 2 of the values in the 3 variables a,b,c what would you do to find the missing variable value?
I will not write the exact answers to this problem. I think you can figure how to write it out yourselves.