The area of an equilateral triangle is (s^2 * √3)/4 where s is the length of a side.
If you connect opposite vertices of the hexagon you create 6 congruent equilateral triangles.
The triangle with perimeter has a side length of 12 so its area is (12^2*√3)/4 = 36√3
The area of the hexagon would be the area of 6 equilateral triangles or 6(s^2*√3)/4
Set this equal to the area of the triangle to get
6(s^2*√3)/4 = 36√3
Do the math and get x = √24 = 2√6