2. $s_1=v_1t\text{ and } s_2=s_0-v_2t$ where $v_1=60\text{ km/h}\quad v_2=80\text{ km/h}\quad s_0=5\text{ km}$. The distance between them: $d^2=s_1^2+s_2^2=v_1^2t^2+s_0^2-2s_0v_2t+v_2^2t^2=10000t^2-800t+25=f(t)$
$f'(t)=20000t-800=0\Rightarrow t=\frac 1{25}\text{ h}$ so the time is 1:02:24, $d=\sqrt{10000/625-800/25+25}=\mathbf{3\text{ km}}$.