If person A starts from the origin on the x axis and person B starts from 30 km on the x axis, then
Let VA = velocity of person A and VB = velocity of person B and let t = time
Case1: Distance A = VA x t The x coordinate is (VA)t
Distance B = VB x t The x coordinate is 30 - (VB)t
Substituting numbers and equating the x coordinates, we have (using 3.33 hours for t)
(VA)t = 30 - (VB)t or 3.33VA + 3.33VB = 30
Case 2: Distance A = 2(VA) + (VA)t x coordinate = 2(VA) + (VA)t
Distance B = (VB)t x coordinate = 30 - (VB)t
Substituting numbers and equating the x coordinates, we have (using 2.5 hours for t)
2(VA)t + (VA)t = (VB)t or 4.5(VA) + 2.5(VB) = 30
Now with the 2 equations (in bold), we solve these 2 simultaneous equations to get
VA = 6.15 km/hr
VB = 2.25 km/hr