Let the side length of the equilateral triangle = S
Then the wire left for the square perimeter = 12 - 3S
So...the side of the square = [ 12- 3S ] / 4
So....the combined areas, A, of both figures can be epresented as
A = ( [ 12- 3S ] / 4 )^2 + (√3/4 )S^2
A = (1/16) ( 9S^2 - 72S + 144) + (√3/4)S^2
A = (9/16 + √3/4)S^2 - (72/16)S + 9
Take the derivative of this and set to 0
A ' = (18/16 + √3/2)S - (72/16) = 0
A ' = ( 9/8 + √3/2)S - 4.5 = 0
(9/8 + √3/2) S = 4.5
S = 4.5 / ( 9/8 + √3/2) ≈ 2,26
So...the combined area is minimized when the side of the equilateral triangle ≈ 2.26 m
See the graph here to confirm this : https://www.desmos.com/calculator/b81ztsrsgv