Minimum cost is 1800 $
Explanation:
Let l be the length of west side and w be the length of north side.
East side = West side = l
North side = South side = w
Area = lw = 540 ft²
We have

Cost for fencing
C = 30 w + 30 l + 20 w = 30 l + 50 w

At minimum cost derivative is zero,
That is

We have
lw = 540
30 x w =540
w = 18 ft
Cost = 30 l + 50 w =30 x 30 + 50 x 18 = 1800 $
Minimum cost is 1800 $