Applet shows two dots moving with constant velocities. The distances between them along the x and y axes can be changed. The velocity ratio tab sets the ratio of velocities of red dot to the velocity of the blue dot.
Your interest is to find the minimum distance between the dots during the motion. You could do this by observing the motion relative to the surface on which the dots are moving or relative to one of the dots.