Answer: The garden has dimensions 30 ft wide X 60 ft long
Step-by-step explanation:
Denote by W the width of the garden and L the length of the garden (longer side) as in the figure attached. The red sides on the figure represent the parts of the garden that require fencing.
L is also the measure of a vertical side of the garden, because a rectangle consists only of vertical and horizontal sides.
We know that the barn is parallel to the longer (vertical) side, so only one of the vertical sides L of the rectangle needs fencing. The other two parts correspond to the horizontal sides of the rectangle so they require 2W feet of fencing. Altogether, the 120 ft of fencing enclose the L+2W ft of the fence, then 120=L+2W. Because the longer side is twice the width, we have that L=2W, so 120=2W+2W=4W. From here, W=30 ft and L=2(30)= 60ft.