A pipeline for transporting oil will connect two points that are 3 miles apart and on opposite banks of a straight river one mile wide. Part of the pipeline will run under water to the opposite bank, and then above ground the remaining distance. If the cost per mile of running the pipeline under water is four times the cost per mile of running it above ground, find the distance of pipeline underwater and above water that will minimize the cost.