Given that the sides of the squares lying on $B C, C A, A B$ are $x, y, z$ respectively, then $\frac{h_{a}-x}{h_{a}}=\frac{x}{a} \Rightarrow \frac{h_{a}-x}{x}=\frac{h_{a}}{a}$
$\Rightarrow \frac{h_{a}}{x}=\frac{h_{a}+a}{a} \Rightarrow x=\frac{a h_{a}}{h_{a}+a}$.
Similarly, we get $y=\frac{b h_{b}}{h_{b}+b}, z=\frac{c h_{c}}{h_{c}+c}$.
Since $B=60^{\circ} \Rightarrow S_{\triangle A B C}=5 \sqrt{3}, b^{2}=a^{2}+c^{2}-a c=21 \Rightarrow b=\sqrt{21}$,
thus $h_{a}=2 \sqrt{3}, h_{b}=\frac{10 \sqrt{7}}{7}, h_{c}=\frac{5 \sqrt{3}}{2}$.
Noting that $a+h_{a}=5+\frac{10 \sqrt{3}}{5}, b+h_{b}=\sqrt{21}+\frac{10 \sqrt{3}}{\sqrt{21}}, c+h_{c}=4+\frac{10 \sqrt{3}}{4}$,
it is easy to see that $c+h_{a}<b+h_{b}<a+h_{a} \Rightarrow z=\frac{10 \sqrt{3}}{4+\frac{5 \sqrt{3}}{2}}=\frac{300-160 \sqrt{3}}{11}$.
13. In a right-angled $\triangle ABC$, given that $A>B>C, A+C=2B, AB=4, BC=5$, then the side length of the largest inscribed square in $\triangle ABC$ is $\qquad$ .