Choosing the conventional coordinate system, we have
v_{1x}(t) = v_1, v_{1y} = -gt which gives \tan \theta_1(t) = -\frac{gt}{v_1}
Similarly, \tan \theta_2(t) = \frac{gt}{v_2}
Since the vectors are perpendicular, we get \tan \theta_1(t)\tan \theta_2(t) = -1 \Rightarrow t = \frac{\sqrt{v_1v_2}}{g}
The vertical displacement is same for the particles and hence the distance between them is the same as the horizontal distance between them which is obviously (v_1+v_2)t = (v_1+v_2)\frac{\sqrt{v_1v_2}}{g}