Alright, let's break this problem down.
First, draw a picture of garden with border to understand the later area sums/calculations.
To get the the main point, we want to minimize the total area of the garden and border to save as much room as possible. In calculus jargon, this means the rate of change of the total area (AT) with respect to both sides of the inner garden will be equal.
dAT/dS1 = dAT/dS2 [The area isn't changing with respect to the North/South side any more than the East/West side of the garden, so this is the goal, now we just need to find AT]
AT = Ag + Ab [Total area equals the sum of garden and border area combined]
Can you figure it out from there? (Hint, find area of garden and area of border in terms of your given distances and the unknown distances, then at the end, use the area of the garden to determine the minimum side lengths you want)
If you're still stumped, follow these next guidelines:
S1 = North/South sides of garden
S2 = East/West sides of garden
d1 = Constant length of border along east/west flanks (1 [m])
d2 = Constant length of border along north/south flanks (2[m])
- Ag = S1S2
- Ab = 4d1d2 + 2d2S1 + 2d1S2
- AT = S1S2 + 4d1d2 + 2d2S1 + 2d1S2
Next, take the derivative of (3) for each variable side of garden...
dAT/dS1 = dAT/dS2
This should lead you to S2 = S1 - 2 [m]
Ag = 30 [m2]
= S2S1
= (S1 - 2 [m])(S1)
= S12 - 2S1 - 30 = 0 [Quadratic formula solves for S1]
Solve for S1 and S2 and those are your minimized lengths for the garden.