This is a problem from Riley-Hobson "Mathematical Methods For Physics And Engineering".
QUESTION: Two horizontal corridors, $0\le x \le a$ with $y\ge 0$ and $0\le y \le b$ with $x\ge 0$, meet at right angles. Find the length of the longest ladder that can be moved around the corner of the corridor. Use Lagrange Multipliers to solve the problem.
I checked the following questions.
that are almost similar.
However I found only one solution which had an approach of Lagrange multipliers.
In that solution, the author writes as follows:
For example, if we rephrase the question as
Find the length of the shortest line segment from $(x,0)$ to $(0,y)$ that passes through $(a,b)$.
then with a little coordinate geometry we can rephrase it again as
Minimize $(x^2+y^2)^{1/2}$ subject to the constraint $\frac ax + \frac by = 1$.
Using the method of Lagrange multipliers from multivariable calculus on this version of the problem yields quickly that the optimum has $(x^3,y^3)$ proportional to $(a,b)$.
Can someone explain how he first makes that rephrasal and then how he derives the constraints and makes that conclusion ?
P.S. The author is not on MathsSE anymore, hence I cannot ask him for clarification.