For this problem, there are two situations. To solve this, let's construct an algebraic equation for each. Let's find the total cost. Let x be the number of yards.
Situation 1: Cost = 4x + 5
Situation 2: Cost = 6x +2
Now, both situations have the same cost. So,
4x + 5 = 6x + 2
6x - 4x = 5 - 2
2x = 3
x = 3/2 or 1.5 yards