NB:$$ \frac{x^2}{a^2}+\frac{y^2}{b^2}-1=0 $$
HB:$$r=x+y$$
$$\Lambda=x+y+\lambda \left( \frac{x^2}{a^2}+\frac{y^2}{b^2}-1\right)$$
$$\frac{\partial \Lambda}{\partial x}=1+\lambda \left( \frac{2x}{a^2}\right)$$
$$\frac{\partial \Lambda}{\partial y}=1+\lambda \left( \frac{2y}{b^2}\right)$$
$$\frac{\partial \Lambda}{\partial \lambda}=\frac{x^2}{a^2}+\frac{y^2}{b^2}-1$$
---
$$0=1+\lambda \left( \frac{2x}{a^2}\right)$$
$$-1=\lambda \left( \frac{2x}{a^2}\right)$$
$$\lambda= - \frac{a^2}{2x}$$ ---
$$\lambda= - \frac{b^2}{2y}$$
$$ \frac{a^2}{2x}= \frac{b^2}{2y}$$
$$ {a^2}{2y}= {b^2}{2x}$$
$$ y= \frac {b^2}{a^2} \cdot x$$---
$$0=\frac{x^2}{a^2}+\frac{y^2}{b^2}-1$$
$$0=\frac{x^2}{a^2}+\frac{\left( \frac {b^2}{a^2} \cdot x \right)^2}{b^2}-1$$
$$1=\frac{x^2}{a^2}+\frac{ \frac {b^4}{a^4} \cdot x ^2}{b^2}$$
$$1=\frac{x^2}{a^2}+\frac{ b^2 \cdot x ^2}{a^4}$$
$$1=\frac{x^2 \cdot a^2}{a^4}+\frac{ b^2 \cdot x ^2}{a^4}$$
$$a^4=x^2 \cdot a^2+ b^2 \cdot x ^2$$
$$a^4=x^2 \cdot ( a^2+ b^2) $$
$$\frac{a^4}{a^2+ b^2}=x^2 $$
$$x=\frac{a^2}{\sqrt{a^2+ b^2}} $$