Ratio of the legs of a right triangle with specified inscribed circle when the area of the triangle is minimized

Let $O$ be a circle of radius $r$ lying in the first quadrant of the Cartesian plane, tangent to the $x$-axis at the point $(r, 0)$ and tangent to the $y$-axis at the point $(0, r)$. Let $T$ be a right triangle whose legs are segments of the axes, with inscribed circle $O$. What is the ratio of the legs of the triangle when the area of $T$ is minimized?

It seems obvious that the answer is $1$ (the right triangle is isosceles), but I'm having a time showing this.

We can draw a diameter through the circle parallel to the $x$-axis. Let $p$ be the point of tangency between the circle and a hypotenuse, and let $\theta$ be the angle between the diameter and the radius meeting $p$. Since the radius meeting $p$ will be perpendicular to the hypotenuse, the hypotenuse will have slope $-\cot\theta$. Letting $(x, 0)$ and $(0, y)$ be the axis intercepts of the hypotenuse, and $[(r+\cos\theta), (r+\sin\theta)]$ the point $p$ of tangency, we have

$$x=r+\cos\theta+r\tan\theta+\sin\theta\tan\theta \\ y=r+\sin\theta+r\cot\theta+\cos\theta\cot\theta.$$

We multiple those (yikes), differentiate, and solve. I did that, thinking that eventually I'd get a simpler expression. No such luck.

Is there a much simpler way to do this that I'm not seeing?

we get that $A=r^2+2\cdot\frac{1}{2}(x-r)r+2\cdot\frac{1}{2}(y-r)r=r(x+y-r)$.
Since we also have $A=\frac{1}{2}xy$, setting $r(x+y-r)=\frac{1}{2}xy$ and solving gives
$\displaystyle y=\frac{2r(x-r)}{x-2r}$ $\;\;$and $\;\;$$A=\displaystyle\frac{1}{2}xy=r\cdot\frac{x^2-rx}{x-2r}. Then A^{\prime}(x)=\displaystyle r\cdot\frac{x^2-4rx+2r^2}{(x-2r)^2}=0 when x=(2+\sqrt{2})r. Now check to see that this gives the same value for y. We can assume r = 1. If we call \theta the angle between the hypotenuse and the x-axis, the area of the triangle works out to be$$A = 1 + \frac{2}{\sqrt{2}\sin(\pi/4 + \theta) - 1}.$$This is clearly minimal when$\theta = \pi/4$. The way I found that formula was by breaking up the triangle into six triangles determined by the sides of the triangle, the radii of the circle to the points of tangency, and the bisectors of the triangle. However, there may be a simpler way I'm not seeing. OTHER METHOD A second method is to let the legs be$1 + a$and$1 + b$. Then the hypotenuse must have length$a+b$. (Divide the hypotenuse at the point of tangency; the two segments must have lengths$a$and$b$.) The Pythagorean Theorem then determines the relation between$a$and$b$, which can be translated into$(a-1)(b-1) = 2$. Subject to this constraint, and$a,b > 1$, we must minimize$(a + 1)(b + 1)$. Substituting$c = a - 1$and$d = b-1$, this amounts, subject to the constraint$cd = 2$, to minimizing$(c + 2)(d+2) = 6 + 2(c+d)$, which is the same problem as minimizing$c + d$subject to$cd = 2$. This is a well known problem;$c$and$d\$ must be taken equal.