Prove triangle similiarity by given expression I am working on the following problem, but I can't seem to figure it out.

The length of the sides in the triangle $T_1$ are $a_1$, $b_1$ and $c_1$. The length of the sides in the triangle $T_2$ are $a_2$, $b_2$ and $c_2$. Moreover: $$\sqrt{a_1 a_2} + \sqrt{b_1 b_2} + \sqrt{c_1 c_2} = \sqrt{(a_1 + b_1 +c_1)(a_2 + b_2 +c_2)}.$$ Show that the triangles are similar.

Any help would be appreciated

An alternative geometric approach is presented. 
Consider vectors $\mathbf{x}=(\sqrt{a_1},\sqrt{b_1},\sqrt{c_1})\in \mathbb{R}^3$ and $\mathbf{y}=(\sqrt{a_2},\sqrt{b_2},\sqrt{c_2})\in \mathbb{R}^3$. 
Then, considering the vector dot product, we have $$\mathbf{x}\cdot\mathbf{y}=\lvert\mathbf{x}\lvert\lvert\mathbf{y}\lvert\cos\theta\\\Rightarrow\sqrt{a_1a_2}+\sqrt{b_1b_2}+\sqrt{c_1c_2}=\sqrt{(a_1+b_1+c_1)(a_2+b_2+c_2)}\cos\theta$$ The equation stated is the case when $\theta=0$. So vectors $\mathbf{x}$ and $\mathbf{y}$ will be linearly dependent, leading (for non-zero constant $k$, as the triangles have positive length sides) to $$a_1=ka_2,\ b_1=kb_2,\ c_1=kc_2\\\Rightarrow \frac{a_2}{a_1}=\frac{b_2}{b_1}=\frac{c_2}{c_1}$$ Thus the two triangles are similar. 
