From the problem, Melissa wants the length of the garden exceeds 3 times the length of potato patch by 2.
Let x = length of square potato patch.
The length of the garden will be :

The width of the garden must exceed the length of the potato patch by 5.
So the width will be :

To summarize, the length and the width of the garden is :
length = 3x + 2 ft
width = x + 5 ft