Oil is being piped from an offshore oil well to a refinery on land. The shoreline is considered straight, the well is 2 miles out to sea (i.e, at a right angle to the shore), the refinery is 10 miles along the coast, underwater pipe costs $360000/mile to construct, but the pipeline only costs $260000/mile on land. Given this how far down the coast should the pipeline be when it reaches land, if cost is to be minimized? ('0 miles' would mean build straight to shore, then make a right angle to the refinery, '10 miles' would mean to build the pipe directly to the refinery).
Leave answer in exact form, not as a decimal approximation
A minimization problem is solved using trigonometry and the Pythagorean theorem. The solution is detailed and well presented. The response received a rating of "5/5" from the student who originally posted the question.