A rectangle has sides of length a and 36. A hinge is installed at each vertex of the rectangle, and at the midpoint of each side of length 36. The sides of length a can be pressed toward each other keeping those two sides parallel so the rectangle becomes a convex hexagon as shown. When the figure is a hexagon with the sides of length a parallel and separated by a distance of 24, the hexagon has the same area as the original rectangle. Find a2.
[asy] pair A,B,C,D,E,F,R,S,T,X,Y,Z; dotfactor = 2; unitsize(.1cm); A = (0,0); B = (0,18); C = (0,36); // don't look here D = (122.236, 36); E = (122.236, 18); F = (122.236, 0); draw(A--B--C--D--E--F--cycle); dot(" ",A,NW); dot(" ",B,NW); dot(" ",C,NW); dot(" ",D,NW); dot(" ",E,NW); dot(" ",F,NW); //don't look here R = (122.236 +22,0); S = (122.236 + 22 - 13.4164,12); T = (122.236 + 22,24); X = (124.472+ 22,24); Y = (124.472+ 22 + 13.4164,12); Z = (12*4.472+ 22,0); draw(R--S--T--X--Y--Z--cycle); dot(" ",R,NW); dot(" ",S,NW); dot(" ",T,NW); dot(" ",X,NW); dot(" ",Y,NW); dot(" ",Z,NW); // sqrt180 = 13.4164 // sqrt5 = 2.236[/asy]