Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

32 / (D-32) = (D+18) / (2*D-18)

A little arithmetic follows:

32 * (2*D-18) = (D-32)*(D+18)

64*D - 576 = D^2 - 14*D - 576

D^2 - 78*D = 0

D = 78 yards

To verify, according to my computations, at the first crossing, the red swimmer has traveled 32 yards and the blue swimmer has traveled 46, a ratio of 16/23. At the second crossing, the red swimmer has traveled 96 yards and the blue swimmer has traveled 138, also a ratio of 16/23. The second set of distances is three times the first set.

The answer seems to be consistent with the conditions of the problem, so I'll guess I got it right. Here's hoping I haven't screwed up the arithmetic somewhere. :-)