Call the very top vertex of the pyramid A.
Call one of the corners of the pyramid B.
Call the midpoint of the base C..
Triangle(ABC) is a right triangle with angle(C) the right angle.
Side(AC) is the height of the right triangle.
Side(AB) is one of the edges of the pyramid and is the hypotenuse of triangle(ABC); it has length 12.
The first problem is to find the distance from C to B.
This distance is one-half of the distance from B to its opposite vertex of the base.
Since the base of the pyramid is a square, each of its sides is 12. The distance from one corner of the square to its opposite corner is 12·sqrt(2). [You can use the Pythagorean Theorem to find this length.]
So, the distance from C to B is one-half of 12·sqrt(2), which is 6·sqrt(2).
To find the height of the pyramid, we can use the Pythagorean Theorem on triangle(ABC).
[ 6·sqrt(2) ]2 + [ CA ]2 = [ 12 ]2
36·2 + [ CA ]2 = 144
72 + [ CA ]2 = 144
[ CA ]2 = 72
CA = sqrt(72)
CA = 6·sqrt(2) <--- height of the pyramid
The area of the base of the pyramid = 12 · 12 = 144
Volume of the pyramid = (1/3) · Area of the Base · Height
= (1/3) · 144 · 6·sqrt(2)
= 288 · 6·sqrt(2)