Well, we can be sure that whatever the width is, we can call it ' W '. Then, from information in the question, the length of the garden is ' 3W '.
Now, the perimeter of a rectangle is (length + width + length + width). Using the fancy algebra labels I just gave them, that's (3W + W + 3W + W). And now I can go through that, add up all the Ws, and get a total of 8W for the perimeter.
But he question tells us that the perimeter is 24 yards, so 8W = 24 yds.
Divide each side of that equation by 8, and we discover that W = 3 yds. And if THAT's true, then 3W = 9 yds. Bada bing ! We have the dimensions of the garden.
It's 3 yards wide and 9 yards long.