Let AB have length 3r. The distance moved by A is then the circumference of a semicircle radius 3r (3$\pi$r). C moves along a circle of radius 2r (2$\pi$r), followed by a semicircle of radius r ($\pi$r). The total distance moved by C is therefore also 3$\pi$r.
This problem is taken from the UKMT Mathematical Challenges.