Let x = length of expensive fencing
y = length of each of the other 2 sides
Then, 2x + 2y = 250, so y = 125 - x
cost of fence = 30x + 6(2y) = 2940
30x + 12(125-x) = 2940
18x = 1440
x = 80 ft y = 125-x = 45 ft