Hello, dopi!
You seem to be using a coordinate system and vectors
. . and I don't know what you plan to do with them.
galactus gave you the solution . . . so why struggle with your approach?
I'll make some diagrams to accompany his excellent solution.
Originally Posted by
galactus
At t=0, they are both 10 kms from their intersection.
Code:
* Q


 10



P *         o
10
hours later, has moved km east to point
. . and has moved km south to point Code:
*

 40t

o B

 1040t
*    o     *
30t A 1030t
And we want to minimize the distance