The distance from X to Y is 8

*u* miles.

At the moment C first arrives at Y, A has travelled

*u* miles from X so the separation between them is 7

*u* miles. When C heads towards A, their relative velocity is 8 + 1 = 9 mph; so C meets A in

hours: i.e.

The point where they meet is

*v* miles from X (distance covered by A in

*v* hours).

At time

*w* hours, when C drops off A, B has travelled 2

*w* miles from X; C is

miles from X. Their separation is therefore

miles. When C heads towards B, their relative velocity is 8 + 2 = 10 mph, so C meets B in

hours: i.e.

The point where they meet is 2

*x* miles from X (distance covered by B in

*x* hours).

At this moment, A has travelled

miles towards Y from where it was dropped off by C, i.e.

miles from X: i.e.

miles from Y. C and B themselves are

miles from Y. As C travels 8 times faster than A,

Since

*w* must be an integer and gcd(369,917) = 1, the smallest value that

*u* can take is 369. This makes

*v* = 656,

*w* = 917,

*x* = 224, which are all integers. We check that

so

*y* = 341 is also an integer. Hence the minimum distance between X and Y is

.