The measures of the smallest angles of three different right triangles sum to $90^\circ$. All three triangles have side lengths that are primitive Pythagorean triples. Two of them are $3-4-5$ and $5-12-13$. What is the perimeter of the third triangle? $\textbf{(A) }40 \qquad$ $ \textbf{(B) }126 \qquad$ $ \textbf{(C) }154 \qquad$ $ \textbf{(D) }176 \qquad$ $ \textbf{(E) }208 \qquad$
Solution
In a right triangle the tangent of the smallest angle is the ratio of the shorter leg to the longer leg. For the $3$-$4$-$5$ triangle $\tan\alpha=\frac34$, and for the $5$-$12$-$13$ triangle $\tan\beta=\frac5{12}$.
Let $\gamma$ be the smallest angle of the third triangle. Since $\alpha+\beta+\gamma=90^\circ$, $$\tan\gamma=\cot(\alpha+\beta)=\frac{1-\tan\alpha\tan\beta}{\tan\alpha+\tan\beta}=\frac{1-\frac{15}{48}}{\frac34+\frac5{12}}=\frac{11/16}{7/6}=\frac{33}{56}.$$
So the legs are in ratio $33:56$. Since $\gcd(33,56)=1$ and $33^2+56^2=1089+3136=4225=65^2$, the triangle is the primitive triple $33$-$56$-$65$.
The measures of the smallest angles of three different right triangles sum to $90^\circ$. All three triangles have side lengths that are primitive Pythagorean triples. Two of them are $5$-$12$-$13$ and $8$-$15$-$17$. What is the perimeter of the third triangle?