Gọi quãng đường AB là S(km)(S>0)
\(\left\{{}\begin{matrix}t_1=\dfrac{S}{20}\left(h\right)\\t_2=\dfrac{S}{30}\left(h\right)\end{matrix}\right.\)
\(v_{tb}=\dfrac{S+S}{t_1+t_2}=\dfrac{2S}{\dfrac{S}{20}+\dfrac{S}{30}}=\dfrac{2S}{S\left(\dfrac{1}{20}+\dfrac{1}{30}\right)}=\dfrac{2}{\dfrac{1}{12}}=24\left(\dfrac{km}{h}\right)\)