[tex]\begin{gathered} \text{ By thales' theorem:} \\ \frac{AB}{20}=\frac{AC}{x+5},\text{ since BC is a midsegment, AB=BC, thus AB+BC=AC, 2AB=AC} \\ \\ \frac{AB}{20}=\frac{2AB}{x+5} \\ \\ \frac{1}{20}=\frac{2}{x+5} \\ \\ x+5=20\cdot2 \\ \\ x+5=40 \\ x=40-5 \\ x=35 \end{gathered}[/tex]