questioner wrote:
This makes no sense to me. Why is it divided by the square root of 3?
Take a look at the shaded triangle:

It's bottom left angle is 60⁰ as an angle of the equilateral triangle.
It's bottom right angle is 90⁰ (as complimentary to the angle of the square).
Therefore it is a 90⁰-60⁰-30⁰ triangle. There is the following property of such triangles: the sides are in 2:√3:1 ratio. We know that the side of the square, which is also the leg of this right triangle, equals 12. So
hypotenuse : 12 = 2 : √3.
hypotenuse = (2/√3) × 12
hypotenuse = 24/√3
hypotenuse = (24 × √3)/(√3 × √3)
hypotenuse = 24√3/3
hypotenuse = 8√3