Two Squares $S_1$ and $S_2$, are inscribed in the triangle $ABC$ as $S_1$ and $ABC$ share a common vertex $C$ and $S_2$ has one of its sides on $AB$. 
Let $ABC$ be a right triangle with $\angle C = 90^\circ$. Two Squares $S_1$ and $S_2$, are inscribed in the triangle $ABC$ such that $S_1$ and $ABC$ share a common vertex $C$ and $S_2$ has one of its sides on $AB$. Suppose that $[S_1] = 1 + [S_2] = 441$ , where $[]$ denotes the area. Find the value of $AC + BC$.

What I Tried :- Here is a picture of my copy I am posting showing whatever I tried with this problem. Everything done is given in the picture.

As you can see, after doing all these I need to somehow relate that $x_2 + y_2 = x_1 + 21$ , and then $k_2 + z_2 = y_1 + 21$ , and then solve for $AC + BC$ . but I am not able to find a good way to proceed on how to do that.
Can anyone help me? Thank You.
 A: Let $a=BC$, $b=AC$, $c=AB$ be the side lengths in the given triangle. Since $c^2=a^2+b^2$ we need two equations in $a,b$ to solve the issue.
$(1)$ First of all, there are similar triangles, the given one with proportion $CB:CA=a:b$, the one with corresponding proportion $(a-21):21$, and the one with corresponding proportion $21:(b-21)$, so
$$
\frac ab = \frac{a-21}{21}= \frac{21}{b-21} \ .
$$
Equivalently,
$$
ab = 21(a+b)\ .
$$
$(2)$ Consider now the other square, it has size $s=\sqrt{440}$. We have again two similar triangles in the picture, both have in  $C$ the right angle, the given one with hypotenuse $c$ and height $h=ab/c$, and its "cut version" with  hypotenuse $s$ and height $h-s$, so we obtain a second equation:
$$
\frac {h-s}s = \frac hc\ .
$$
Equivalently, $hc-sc=hs$, i.e. $hc^2=sc^2+hcs$, i.e. $abc=s(a^2+b^2+ab)$, and after squaring:
$$
a^2b^2(a^2+b^2) = 440(a^2+b^2+ab)^2\ .
$$
We solve the system involving the two equations, let $S$ be the sum $S=a+b$, the number asked for in the OP, and $P$ the product $P=ab$. Then we have:
$$
\left\{
\begin{aligned}
P &= 21 S\ ,
\\
P^2(S^2-2P) &= 440(S^2-P)^2\ .
\end{aligned}
\right.
$$
We plug in $P$ from the first equation in the second equation, get:
$$
(S + 420)(S - 462)S^2\ .
$$
We have thus $\color{blue}{S=462}$, since
we must reject for geometrical reasons the vanishing of the other factors.

To obtain $a,b$ explicitly, we have to solve the equation $x^2-Sx+P=0$, which is $x^2 - 462x + 21\cdot 462=0$. And indeed, the solutions $231\pm 63\sqrt{11}$ are real positive numbers, the two values of $a,b$.
As a final note, the given numbers are so ugly, that checking is done hard, hope there is no computational error in between.
A: Hint: The property that $[S_1]=441$ gives you a way to represent all sides of $\triangle ABC$ in terms of one parameter $\theta=\angle ABC$; you get
$$AC=21(1+\tan\theta),\ BC=21(1+\cot\theta),\ AB=21(\sec\theta+\csc\theta)$$
using the two right triangles $\triangle AEF$ and $\triangle BDF$. On the other hand, if you drop the perpendicular from $C$ to $AB$, you can get somewhat similar relations in the second diagram, using $[S_2]=440$ (it is a bit more complex). Equating, can you solve for $\theta$?
