Finding Angles Given Two Triangles with Equal Perimeters The two right triangles shown below have equal perimeters 

The hypotenuse of
the orange triangle is one leg of the green triangle stacked on top of it. If the smallest angle of the orange triangle is 20 degrees, what are the angles of the green right triangle?
I think I have a solution but it will be difficult to explain. I will use the following variables:

$$
\begin{split} a&amp;=\text{base of orange triangle} \\ b&amp;=\text{height of orange triangle} \\ c&amp;= \text{"left" side of green triangle} \end{split}
$$

Then the hypotenuse of the orange triangle is $\sqrt{a^2+b^2}$ and the hypotenuse of the green triangle is $\sqrt{a^2+b^2+c^2}$. Since the perimeters of both triangles are equal we must have:

$$
\begin{split} &amp;&amp;a+b=c+\sqrt{a^2+b^2+c^2} \\ &amp;\implies&amp; a+b-c=\sqrt{a^2+b^2+c^2} \\ &amp;\implies&amp; (a+b-c)^2=a^2+b^2+c^2 \\ &amp;\implies&amp; a^2+b^2+c^2+2ab-2ac-2bc=a^2+b^2+c^2 \\ &amp;\implies&amp; ab=ac+bc \\ &amp;\implies&amp; c=\frac{ab}{a+b} \end{split}
$$

So now we have all sides in terms of $a$ and $b$. But we can relate $a$ and $b$ using the angle we are given. So:

$$
\tan(20)=\frac{b}{a} \implies b=a\tan(20)
$$

Using this we get:

$$
\begin{split} a^2+b^2=a^2+a^2\tan^2(20)=a^2(1+\tan^2(20))=\frac{a^2}{\sin^2(20)}  \end{split}
$$

Now we can get an expression for $a^2+b^2+c^2$ purely in terms of $a$:

$$
\begin{split} a^2+b^2+c^2&amp;= \frac{a^2}{\sin^2(20)}+\frac{a^2b^2}{\frac{a^2}{\sin^2(20)}+2ab}\\ &amp;=\frac{a^2}{\sin^2(20)}+\frac{a^4\tan^2(20)}{\frac{a^2}{\sin^2(20)}+2a^2\tan(20)} \\ &amp;=\frac{a^2}{\sin^2(20)}+\frac{a^4\tan^2(20)\sin^2(20)}{a^2+2a^2\tan(20)\sin^2(20)} \\ &amp;=\frac{a^2}{\sin^2(20)}+\frac{a^2\tan^2(20)\sin^2(20)}{1+2\tan(20)\sin^2(20)} \\ &amp;=a^2\left[ \frac{1}{\sin^2(20)}+\frac{\tan^2(20)\sin^2(20)}{1+2\tan(20)\sin^2(20)} \right] \\ &amp;= a^2K^2 \end{split}
$$

where $K^2$ is just the number in the square brackets (the only reason I made it $K^2$ instead of $K$ is because we will need to take square roots). Finally, letting $\theta$ be the smallest angle of the green triangle, we get:

$$
\begin{split} \cos(\theta)&amp;=\frac{\sqrt{a^2+b^2}}{\sqrt{a^2+b^2+c^2}} \\ &amp;=\frac{\frac{a}{\sin(20)}}{aK} \\ &amp;=\frac{1}{K\sin(20)} \end{split}
$$

You can work out that $K\approx 2.9262$ and then plugging this in gives us $\theta\approx 2.34^{\circ}$.
I went through the same process as the previous answer, but discovered a mistake:

$$a^2 + b^2 = a^2 + a^2 \tan^2(20) = a^2 (1 + \tan^2 (20)) = a^2 / \cos^2 (20) \textrm{, not } \sin^2 (20)$$