Let's call the length of the fence as L and the width of the fence as W. From the first statement, we get a relation between those two.
"The length of the garden is 5 feet more than 2 times the width."
From this sentence, we know that
![L=5+2W](https://img.qammunity.org/2023/formulas/mathematics/college/xf0vtqpv4i08wsqbypl2afzd7lzrcr1uuc.png)
And from the statement
"He needs 58 feet of fencing to do the job."
We know that the perimeter should add up to 58 feet. The perimeter is the sum of the sides, then, it is two times the width plus two times the length.
![2L+2W=58](https://img.qammunity.org/2023/formulas/mathematics/college/wf18slxuda8sz35nbhv58sima9kennpk49.png)
Now, we have a system with two equations and two variables.
![\begin{cases}2L+2W=58 \\ L=5+2W\end{cases}](https://img.qammunity.org/2023/formulas/mathematics/college/l102chmdm3ikiujv3puzgfakuafjx8ymt8.png)
We can divide the first one by two on both sides of the equality
![\begin{cases}L+W=29 \\ L=5+2W\end{cases}](https://img.qammunity.org/2023/formulas/mathematics/college/rg4z8hntlx3mi9fuk0yi58pweddebt2jjp.png)
If we substitute our L in the second equation for the L in the first equation, we get an equation only for W.
![\begin{gathered} (5+2W)+W=29 \\ 5+3W=29 \\ W=(29-5)/(3)=8 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/rcmyeegd2d8fowlhsx5uazj5b7tutha8z3.png)
Now that we know the width, we can calculate the length.
![L=5+2W\Rightarrow L=5+2*8=5+16=21](https://img.qammunity.org/2023/formulas/mathematics/college/nhkef45ce6nym6p5ymfixucjvjq98z24a2.png)
The length of the fence is 21 feet, and the width is 8 feet.