This is a very interesting calculus word problem that I came across in an old textbook of mine. So I know its got something to do with minimising distance, but other than that, the textbook gave no hints really and I'm really not sure about how to approach it. However, I did manage to make a picture or diagram of it.

Any guidance hints or help would be truly greatly appreciated. Thanks in advance :) So anyway, here the problem goes:
A power house, $P$, is on one bank of a straight river $200\textrm{ m}$ wide, and a factory, $F$, is on the opposite bank $400\textrm{ m}$ downstream from $P$.
The cable has to be taken across the river, under water at a cost of $\text{\$}6/\textrm{m}$.
On land the cost is $\text{\$}3/\textrm{m}$.
What path should be chosen so that the cost is minimized?
Edit: Thanks guys, I think I found out the answer. I shall post it on MSE.
So here is the diagram:
Please note the difference between P and P'
Let's look at the extreme cases first:
Straight across the river is $ \$200 m \cdot \$ 6m = \$1200$
$+ 400 m \ \text{on land} \cdot \$ 3m = \$1200$
Total: $ \$ 2400$
If we go diagonal, then by Pythagoras, it's $200 \sqrt 5 m \cdot \$6m = 1200 \sqrt 5 \approx \$2683$
Let the point straight across from P be P'.
Let's choose a landfall point Q, somewhere P' and F.
Let distance from P' to Q be q.
So total distance is
$\sqrt{200² + q²}$ (diagonal under the river) + 400 - q (on land)
Cost is $6 \cdot \sqrt{200² + q²} + 3 \cdot (400 - q)$
We want to minimize that.
First we can divide by 3 -- same value for q will be maximum.
$2 \cdot \sqrt{200² + q²} + 400 - q$
Derivative is
$2q \cdot \sqrt{200² + q²} - 1$
We set that to 0
$2q \cdot \sqrt{40000+q²} = 1$
$2q = \sqrt{40000+q²}$
Square:
$4 q² = 40000 + q^2$
$3 q² = 40000$
$q = 200 \sqrt 3$
Length under water is then $400 \sqrt 3 \approx 231$
and length on land is $400 - 200 \sqrt 3 \approx 284$
Cost is $6 \cdot 400\sqrt 3 + 3 (400 - 200\sqrt 3) = \$2239.23$
The triangle $P-P'-Q$ has sides $200 - 200\sqrt 3 - 400 \sqrt 3$
and therefore it is a 30-60-90 triangle.
The angle QPQ' = 30°.