To find the width of the rectangle, we can use the formula for the perimeter of a rectangle:
In Nya's case, we know the perimeter (P) is 24 feet and the length is 3 feet. We can substitute these values into the formula:
First, divide both sides by 2:
Next, subtract 3 from both sides to solve for the width:
Therefore, the width of the garden needs to be 9 feet.