The Pythagorean Theorem is used to find the unknown length of a side of a triangle or (in your case) a pyramid. The Pythagorean theorem is a^2 + b^2 = c^2 with c being the hypotenuse (longest side). Use this theorem to find each of the lengths of the sides of the pyramids that you need to find the volume of each respective pyramid.