Think of it this way. The garden is a rectangle. We are trying to find the area of the walk way (that is like a line) around the rectangle. We know area= length*width.
We have the dimensions of the rectangular garden. 3 ft* 5 ft. This means that two sides of the rectangle is 3 ft long, and the other two are 5 ft long. We know the width of the side walk already. (which is 2)