# AoPS Wiki talk:Problem of the Day/June 18, 2011

## Solution

Let $AD = x$. Since we know that the perimeter of $ABCD$ is $42$, $BC = 42 - 9 - 15 - x = 18 - x$. Construct a perpendicular to $DC$ from point $B$. Call the intersection of $DC$ and this perpendicular point $E$. Since angle $A$ is right, $ABED$ is a rectangle, and thus angle $BEC$ is right, and $AB = DE = 9$. $EC = 15 - 9 = 6$; by the Pythagorean Theorem, $BE = x = 8$, so $AD = 8$ and $BC = 18 - 8 = 10$. Again by the Pythagorean Theorem, $AC = 17$. Since $AB$ and $DC$ are bases, $AB$ is parallel to$DC$, and so angle $BAX$ = angle $DCX$; by vertical angles, angle $AXB$ = angle $DXC$. By AA, triangle $DXC$ ~ triangle $BXA$ in a ratio of $\frac{9}{15}$. Thus, $\frac{AX}{XC} = \frac{9}{15}$, so $XC$ is $\frac{15}{24}$ of $AC$. Note that the distance from $X$ to $DC$ is really the length of the perpendicular to $DC$ drawn from $X$ by definition. Drawing this perpendicular and letting the point of intersection of $DC$ and $X$ be point $F$, we have that triangle $XFC$ is similar to triangle $ADC$ by AA in a ratio of $\frac{15}{24}$. Thus $\frac{XF}{AD} = \frac{15}{24}$, so $\frac{XF}{8} = \frac{15}{24}$. Solving, we get $XF = \boxed{5}$.