There is another "trick" solution : Let's denote a point when the fly turns around to be a step. Then just notice, from any one step the next, the fly travels exactly 1.5x the distance of any of the bicycles, since it goes 15mph versus the bicyclye's 10mph. This holds at each step, so is true of the total distance traveled as well. But alltogether, one bicycle will travel exactly half of the 20miles, so 10miles. So the fly will travel 15miles.