Let's assume that the width of the rectangular garden is "w" yards.
According to the problem, the length is 2 yards more than the width. Therefore, the length can be expressed as "w + 2" yards.
The area of a rectangle is given by the formula: Area = length x width. In this case, the area is 80 square yards. Therefore, we can write:
(w + 2) x w = 80
Expanding the left-hand side, we get:
w^2 + 2w = 80
Bringing all the terms to one side, we get:
w^2 + 2w - 80 = 0
We can solve this quadratic equation using the quadratic formula:
w = [-2 ± sqrt(2^2 - 4 x 1 x (-80))] / (2 x 1)
w = [-2 ± sqrt(324)] / 2
w = [-2 ± 18] / 2
Therefore, the possible values of w are -10 and 8. However, the width cannot be negative, so we discard the negative value. Therefore, the width of the rectangular garden is 8 yards.
Using the formula for the length, we get:
Length = w + 2 = 8 + 2 = 10 yards.
Therefore, the dimensions of the rectangular garden are 8 yards by 10 yards.