The poster will have minimum area when the margins are the same fraction of total width in each direction. That is, the poster will be twice as wide as it is tall.
That condition requires the width of the printed area of the poster to be
width = √(2*388 cm²) = 27.86 cm
so the total width will be
27.86 cm + 2×4 cm = 35.86 cm
The height will be half that,
height = width/2 = 17.93 cm
The poster with the smallest area will be 36.86 cm wide by 17.93 cm high.
_____
Let A represent the printable area of the poster, and let mx and my represent the total margin width in the x (horizontal) and y (vertical) directions, respectively. Then the area of the poster with margins (P) as a function of poster width w is ...
P = w*(A/(w -mx) +my)
We want to find w so that the derivative dP/dw is zero.
dP/dw = (A/(w -mx) +my) -w*(A/(w -mx)^2) = 0
-mx*A/(w -mx)^2 +my = 0
(w -mx)^2 = A(mx/my)
Then the overall poster width is ...
w = mx +√(A*mx/my) . . . . . . as described above.