I label the island I.
The total distance is d = IC + CD
The total energy is e = 2*IC + CD
Let BC = x
Then you can calculate the energy by:
You'll get the minimum if e'(x) = 0. So you need first the derivative of e (use chain rule!):
Now e'(x) = 0:
. Multiply both sides by the denominator and afterwards square both sides:
. Solve for x. You'll get 2 values for x. The negative one is senseless in the described situation.