1. The problem statement, all variables and given/known data

Two rivers of unequal width (64m and 125m) meet at a right angle, forming an L-shaped channel. What is the longest possible log you can float on it?

2. Relevant equations

3. The attempt at a solution
I tried for equal widths and built a recursive algorithm for turning the log. But it is getting stuck if the log is $$2\sqrt{2}(Width)$$

 PhysOrg.com science news on PhysOrg.com >> Front-row seats to climate change>> Attacking MRSA with metals from antibacterial clays>> New formula invented for microscope viewing, substitutes for federally controlled drug
 the log will turn around the inner corner. just find a formula for finding the length of a line entirely in the water which passes through that point. then find the minimum
 Recognitions: Gold Member Science Advisor Staff Emeritus Start by drawing a picture. Draw two channels of width 64 and 125 and draw a straight line from the outside edges just touching the inside corner. You should be able to find a formula for the length of that line in terms of x, the distance from the outside corner to one of the ends of the line. Then find x which minimizes length. You MIGHT be able to get that by completing the square but I seem to remember a problem like this requiring a derivative. Are you sure this is "precalculus"?