Is there a way to find the area of the right-angled triangle given the dimensions of the rectangle? The rectangle can fit into the same right-angled triangle in two ways, as shown below:
Let $a$ = the width of the rectangle, $b$ = the length of the rectangle, $x$ = the base of the right-angled triangle and $y$ = the height of the right-angled triangle. $a$ and $b$ are known quantities as mentioned.
Currently, I'm thinking about similar triangles in the diagram on the left. Using the two smaller right-angled triangles that fit around the rectangle, $(x-a)/a = b/(y-b)$. I also know that the sum of the areas of the mini triangles in the first right-angled triangle is the same as the sum of the areas of the mini triangles in the second right-angled triangle. To express this, I thought about using the labelled lengths for the first right-angled triangle and subtracting the area of the rectangle ($ab$) from the area of the whole right-angled triangle ($\frac{1}{2}xy$) for the second right-angled triangle and equating them.
Expressing this mathematically: $$\frac{1}{2}a(y-b)+\frac{1}{2}b(x-a)=\frac{1}{2}xy-ab$$
Given that I know what $a$ and $b$ are, surely I can solve for unknowns $x$ and $y$ using simultaneous equations? However, I'm wondering whether I'm missing anything by not explicitly using the fact that the rectangle can fit in two ways?

We can show that the configuration forces two of the rectangle vertices to coincide, as shown in the figure below, where the two rectangles are $APQR$ and $STUV$.
Let $\overline{TB}=x$. Then $\overline{SB} = \sqrt{x^2+a^2}$ and similarity $ASV \sim SBT$ yields $\overline{AS} = \frac{bx}{\sqrt{x^2+a^2}}$.
If we now use the similarity $PBQ \sim SBT$ we derive the condition $$\frac{\overline{TB}}{\overline{TS}} = \frac{\overline{PB}}{\overline{PQ}},$$ i.e. $$\frac{\overline{TB}}{\overline{TS}} = \frac{\overline{AS}+\overline{SB}-\overline{AP}}{\overline{PQ}},$$ which can be written in terms of the unknown $x$ as $$\frac{bx}{a} = \frac{bx}{\sqrt{x^2+a^2}}+\sqrt{x^2+a^2}-a$$ which is equivalent to $$bx = a\sqrt{x^2+a^2}.\tag{1}\label{1}$$ Recalling that $\overline{AS} = \frac{bx}{\sqrt{x^2+a^2}}$ we get $$\overline{AS} = \overline{AP} = a.$$ Solving \eqref{1} yields $$x=\frac{a^2}{\sqrt{b^2-a^2}}$$ and therefore $\overline{SB} = \frac{ab}{\sqrt{b^2-a^2}}$. Finally, similarity $ABC \sim PQB$ gives $$\overline{AB} = a+\frac{ab}{\sqrt{b^2-a^2}}$$ and $$\overline{AC} = b+\sqrt{b^2-a^2},$$ so that the required area is $$\boxed{[ABC] = \frac12 \left(a+\frac{ab}{\sqrt{b^2-a^2}}\right)\left(b+\sqrt{b^2-a^2}\right)}.$$