There is a right triangle folded down from the right-hand corner. The picture shows "x" as the amount folded down along the right edge, so "x" is one leg (and the height). The fold length is "y", so "y" is the hypotenuse. I've labelled the part of the top that's folded down as "z", so "z" is the other leg.The upper right-hand corner of a piece of paper, 12 inches long by 8 inches high, is folded over to the bottom edge. How would you fold it so as to minimize the length of the fold?

I think I should use the Pythagorean Theorem, and try to minimize the length of the hypotenuse.

Obviously, 0 < x < 8 and 0 < z < 12. I don't know if this will matter. And I don't see where to go from this. Hints?

Thank you.