令 BC = a,AC = b
AB = √(a^2 + b^2)
由於相似,(b - 21)/21 = b/a
ab = 21(a + b)
再令 AB = x + √440 + y (由左上到右下分別是 x,√440,y)
x/√440 = b/a
y/√440 = a/b
AB = √440 * (b/a + 1 + a/b) = √440 * [(a + b)^2 - ab]/(ab)
√440 * [(a + b)^2 - ab]/(ab) = √(a^2 + b^2)
令 a + b = t
上述方程改寫成
√440 * (t^2 - 21t)/(21t) = √(t^2 - 42t)
√440 * (t - 21)/21 = √(t^2 - 42t)
440 * (t - 21)^2 = 441(t^2 - 42t)
t^2 - 42t - 440 * 441 = 0
(t - 22 * 21)(t + 20 * 21) = 0
所求 = t = 22 * 21 = 462