You can also use a proportion to find the geometric mean. This is typically done to find the altitude drawn from the hypotenuse to the right angle of a right triangle. Since drawing an altitude as described creates similar right triangles with the altitude as a shared leg of the two new right triangles, a proportion can be used to compare the corresponding sides.
6/24 = 24/x
Cross multiply to solve:
6x = 576
x = 96