ans= (v2-v1) .(p1-p2) here( ) denote vectors
[ mod(v2-v1)]2
soln: (v2-v1) vector is the relative velocit of 2 wrt 1
shortest distance will b obtained at position where line joining 1 and 2 is perpendicular to the relative velocity vector
so let in time t the condition required is obtained,
let B be the angle between relative velocity vector and line joining 1&2
so cos (B)=mod(v2-v1)t/mod(p1-p2)=(v2-v1).(p1-p2)/{mod[v2-v1]*mod[p1-p2]}