The radius \( r \) of the circle inscribed in an equilateral triangle is given by:
\[ r = \frac{\Delta}{s} = \frac{\sqrt{3}a^2}{4a} = \frac{a}{2\sqrt{3}} = \frac{12}{2\sqrt{3}} = 2\sqrt{3}. \]
The side of the square inscribed in this circle is:
\[ \lambda = r\sqrt{2} = 2\sqrt{3} \cdot \sqrt{2} = 2\sqrt{6}. \]
Area of the square:
\[ m = \lambda^2 = (2\sqrt{6})^2 = 24. \]
Perimeter of the square:
\[ n = 4\lambda = 4(2\sqrt{6}) = 8\sqrt{6}. \]
\[ m + n^2 = 24 + (8\sqrt{6})^2 = 24 + 384 = 408. \]