I have two objects moving away in space whose positions given by $r_1$ and $r_2$, their velocities $v_1$ and $v_2$ and relative vectors R=$r_2$-$r_1$ and V=$v_2$-$v_1$. How to find the time at which these objects are separated by a distance D?. Assuming radial velocity, $V_r$ is $\frac{R \cdot V}{\vert R\vert} $ Is $\frac{D-d_0}{V_r}$ correct formula, $d_0$ being initial distance between points?
For example, $r_1$ = [3,8], $r_2$ = [5,4], $v_1$ = [-1,1], $v_2$ = [1,1], then how to find time at which they are separated by distance 10? The results differ from simple enumeration of their positions over time using $r+v \cdot t$ and finding distance and interpolating between them. What am I missing?