# Talk:1987 AIME Problems/Problem 15

Another solution. Let AC be x, and BC be y. We are trying to find AC + BC = x+y.

Because of similar triangles in the S1 diagram, (x-21)/21 = 21/(y-21) After simplifying, we get xy = 21(x+y).

Now we find the hypotenuse using the similar triangles in the S2 diagram. The first segment is sqrt(440)x/y. The second segment is sqrt(440). The third segment is sqrt(440)y/x.

The entire hypotenuse length = sqrt(440)*(x/y + 1 + y/x) =sqrt(440)*(x^2+y^2+xy)/(xy). =sqrt(440)*((x+y)^2-xy)/(xy). =sqrt(440)*((x+y)^2/(xy) - 1).

Substitution 21(x+y) for xy, we get: =sqrt(440)*((x+y)/21 - 1).

Then applying pythagorean theorem: x^2 + y^2 = 440*((x+y)/21 - 1)^2. (x+y)^2 - 2(xy)= 440/441 ((x+y)-21)^2. (x+y)^2 - 42 (x+y) = 440/441 ((x+y)-21)^2.

Let z = x+y which is the answer we're looking for. 441z^2 - 441*42z = 440 (z^2 - 42z + 441) z^2 - 42z - 194040 = 0. (z+420)(z-462)=0. z=462.