if the Length is 5 feet longer than the width then we can say the width is X and the length is X+5. If the perimeter is 170 feet then we can calculate the perimeter as
X+(X+5)+X+(X+5)=170 feet
2X+2 (X+5)=170 feet
2X+2X+10=170 feet
4X+10=170 feet
4X=170 - 10 feet
4X=160
X=160/4
X=40
so the width of the garden is 40 feet and the length is 40+5=45 feet