Some friends went on a trip from a to b via p. walking from a to p
at 6 km/h and the rest of the way at 3 km/h took 1 hour and 40
minutes. if they had walked the first stretch at 3 km/h and the rest of
the way at 2 km/h, it would have taken 3 hours. find the distance
between a and b.