A: If the 1st side of the garden is x feet long then the other sides are 2x - 5. The perimeter is simply the measure of the distance around the triangle, so the length of all three sides added up. So the equation to find the perimeter (p) would be...
p = x + (2x+5) + (2x+5)
or
p = x + 2(2x+5)
This is actually an equation so the expression to represent perimeter would simply be...
x + 2(2x+5)
B: Since we know the equation for the perimeter and we know that we have 40 feet of fencing, then the equation to find the left over fencing would just be the length of fencing minus the perimeter...
40 - x + 2(2x+5) = the leftover amount of fencing
so the expression is...
40 - x + 2(2x+5)
We have to simplify this as a product of fractions. Notice that the 6 has a negative sign, therefore, the result will be negative. We have then:

therefore, the simplified result is -2
4¹/₃x = ⁵/₁₂x - 6
3¹¹/₁₂x = -6
x = -1²⁵/₄₇