Answer
$c(x)=12x$
Work Step by Step
The length of a side is $x$.
The fencing for two sides (east and west side) cost 4 per foot, therefore it costs $4x$ for each.
The fencing for two sides (north and south side) cost 2 per foot, therefore it costs $2x$ for each.
The cost of the fencing for all sides is
$c(x)=2*4x+2*2x=8x+4x=12x$