Question 1079544
Let the side parallelto the house = {{{ y }}}
Let each of the other 2 sides  = {{{ x }}}
----------------------
Equation for area:
{{{ x*y = 40 }}} m2
{{{ y = 40/x }}}
-------------------
Let {{{ P }}} = the perimeter of the 3 walls
{{{ P = 40/x + 2x }}}
First I'll show a plot of {{{ P }}}
{{{ graph( 400, 400, -10, 10, -3, 30, 40/x + 2x ) }}} 
----------------------------
Assuming this is a calculus problem,
I'll find the derivative:
{{{ Q = -40/x^2 + 2 }}}
Find where the slope = 0
{{{ -40/x^2 + 2 = 0 }}}
{{{ 40/x^2 = 2 }}}
{{{ 2x^2 = 40 }}}
{{{ x^2 = 20 }}}
{{{ x = 4.472 }}}
and
{{{ y = 40/x }}}
{{{ y = 40/4.472 }}}
{{{ y = 8.944 }}}
------------------------
The dimensions are 4.472 x 8.944
---------------------------------
The minimum perimeter is:
{{{ P = 40/x + 2x }}}
{{{ P = 8.944 + 8.944 }}}
{{{ P[min] = 17.89 }}} m
------------------------
check the math & possibly get another opinion