Choose a point P somewhere along the shore as in the diagram.
Create a right triangle and use Pythagoras to find the hypoteneuse which will be the length of pipe under water.
The underwater cost is 15/meter:
The cost over land is
Now, set to 0 and solve for x and we find that
Now you can finish by interpreting.