The Pythagorean Theorem is a^2 +b^2 = c^2, where a and b are the sides and c is the hypotenuse ( angled line).
3.
a^2 + 6^2 = 18^2
a^2 + 36 = 324
a^2 = 324 - 36
a^2 = 288
a =√288
a = 12√2
4.
a^2 + 3^2 = 9^2
a^2 + 9 = 81
a^2 = 81-9
a^2 = 72
a = √72
a = 6√2