distance=speed × time.
Let x=required distance, s=speed, t=time, so x=st. The distance x is fixed.
Also, x=(s+3)(t-⅔)=(s-2)(t+⅔)=st.
Therefore st-⅔s+3t-2=st+⅔s-2t-4/3. Note that the term st cancels out:
5t=4s/3+2/3, 15t=4s+2 so t=(4s+2)/15.
And: st-⅔s+3t-2=st, -2s+9t-6=0, t=(6+2s)/9.
We now have two expressions for t in terms of s, which can be equated:
(4s+2)/15=(6+2s)/9, multiply through by 45: 3(4s+2)=5(6+2s), 12s+6=30+10s, 2s=24, s=12 kph.
So t=(6+24)/9=30/9=10/3=3⅓hrs.
Therefore, x=12×3⅓=40km.
CHECK
s+3=15kph, s-2=10kph, t+40 mins=4hrs, t-40 mins=2hrs 40 mins (2⅔hrs).
x=40=15×8/3=10×4.