Minimizing Costs (Word Problem)

This is a word problem that deals with (minimizing costs):

A power line is to be constructed from a power station at point A to an island at point C, which is 1 mi directly out in the water from a point B on the shore. Point B is 4 mi downshore from the power station at A. It costs $5000 per mile to lay the power line under water and $3000 per mile to lay the line under ground. At what point S downshore from A should the line come to the shore in order to minimize cost? Note that S could very well be B or A (Hint: The length of CS is sqrt(1 + x^2)

HELP PLEASE!!!