Hi Mikey,
To answer this question, we can break the question down into equations. The first part tells us that the area of the rectangular garden is 125 feet. Can you think of an equation for the area of a rectangle? This equation will be equal to 125 ft sq and the equation will have x as one of the dimensions. We can assign another variable for the other dimension, let's say z.
Next, we need an equation for the cost. The cost for any side of the garden will be the price per foot times the length of that side in feet. Depending on which side we assign as x, the opposite side will also be x. The same goes for z. We can now calculate the price of each side and the sum of those prices will be the total cost.
Note that to get C as a function of x, we need to replace z with x by substituting the first equation (area equation) into the second equation (cost equation).
Let me know if you have any other questions about this problem.