AMC12 2017 12A, Problem 19

A square with side length $x$ is inscribed in a right triangle with sides of length $3$, $4$, and $5$ so that one vertex of the square coincides with the right-angle vertex of the triangle. A square with side length $y$ is inscribed in another right triangle with sides of length $3$, $4$, and $5$ so that one side of the square lies on the hypotenuse of the triangle. What is $\frac{x}{y}$?

Solution: Analyze the first right triangle. [asy] pair A,B,C; pair D, e, F; A = (0,0); B = (4,0); C = (0,3);  D = (0, 12/7); e = (12/7 , 12/7); F = (12/7, 0);  draw(A--B--C--cycle); draw(D--e--F);  label("$x$", D/2, W); label("$A$", A, SW); label("$B$", B, SE); label("$C$", C, N); label("$D$", D, W); label("$E$", e, NE); label("$F$", F, S); [/asy] Note that $\triangle ABC$ and $\triangle FBE$ are similar, so $\frac{BF}{FE} = \frac{AB}{AC}$. This can be written as $\frac{4-x}{x}=\frac{4}{3}$. Solving, $x = \frac{12}{7}$. Now we analyze the second triangle. [asy] pair A,B,C; pair q, R, S, T; A = (0,0); B = (4,0); C = (0,3);  q = (1.297, 0); R = (2.27 , 1.297); S = (0.973, 2.27); T  = (0, 0.973);  draw(A--B--C--cycle); draw(q--R--S--T--cycle);  label("$y$", (q+R)/2, NW); label("$A'$", A, SW); label("$B'$", B, SE); label("$C'$", C, N); label("$Q$", (q-(0,0.3))); label("$R$", R, NE); label("$S$", S, NE); label("$T$", T, W); [/asy] Similarly, $\triangle A'B'C'$ and $\triangle RB'Q$ are similar, so $RB' = \frac{4}{3}y$, and $C'S = \frac{3}{4}y$. Thus, $C'B' = C'S + SR + RB' = \frac{4}{3}y + y + \frac{3}{4}y = 5$. Solving for $y$, we get $y = \frac{60}{37}$. Thus, $\frac{x}{y} = \frac{37}{35} \implies \fbox{\frac{37}{35}}$.

Answer: \frac{37}{35}