⃗r₁⋅⃗v₁=⃗r₂⋅⃗v₂
⃗r₁−⃗r₂=⃗v₁−⃗v₂
‖⃗r₁−⃗r₂‖=‖⃗v₂−⃗v₁‖
⃗r₁×⃗v₁=⃗r₂×⃗v₂
For the collision the final position of the both particles should be equal.hence,
⃗r₁+⃗v₁t=⃗r₂+⃗v₂t
or
⃗r₁−⃗r₂=(⃗v₂−⃗v₁)t
or
⃗r₁−⃗r₂=(⃗v₂−⃗v₁)∣∣⃗r₁−⃗r₂∣∣∣∣⃗v₂−⃗v₁∣∣
or
∣∣⃗r₁−⃗r₂∣∣∣∣⃗r₁−⃗r₂∣∣=∣∣⃗v₂−⃗v₁∣∣∣∣⃗v₂−⃗v₁∣∣