Two steam locomotives are approaching each other, each at 30 mi/hr, heading for a sure head-on collision. A rhinoceros beetle, who flies with a constant speed of 40 mi/hr, leaves the front of the first locomotive when the engines are just 2.000 miles apart, and flies to the front of the second engine. It immediately turns around and flies back to the first engine which is now a little closer. It then flies back to the second, then to the first, and so on, until the trains finally crash. What total distance does the rhinoceros beetle fly before ultimately being smushed between the two train engines?

To find the total distance the rhinoceros beetle flies before being smushed between the two train engines, we need to calculate the distance it travels on each round trip. Let's break down the scenario step by step.

1. When the beetle leaves the front of the first locomotive, the trains are 2.000 miles apart, both moving towards each other at 30 mi/hr. The relative speed between the trains is 30+ 30 = 60 mi/hr.

2. Since the beetle flies at a constant speed of 40 mi/hr, the time it takes for it to reach the front of the second engine (2.000 miles away) can be calculated using the formula:
time = distance / speed
time = 2.000 miles / 40 mi/hr
time = 0.05 hours (or 3 minutes)

3. In this time, the two trains will have covered a distance equal to the relative speed multiplied by the time:
distance covered by trains = relative speed * time
distance covered by trains = 60 mi/hr * 0.05 hours
distance covered by trains = 3 miles

4. When the beetle reaches the front of the second engine, it immediately turns around and flies back to the first engine. During this trip, the trains move closer to each other. Now, the distance between the two trains is 2.000 - 3 = 1.997 miles.

5. The beetle travels the same distance of 1.997 miles back to the first engine.

6. The beetle continues flying back and forth between the two engines until they collide. Every time it flies back, the distance between the trains reduces by 3 miles (the distance they cover each time).

7. We can calculate the number of back-and-forth trips the beetle makes using the formula:
number of trips = (initial distance - final distance) / distance covered by trains
number of trips = (2.000 miles - 0) / 3 miles
number of trips = 666.67 (approx)

8. However, since the beetle can't make a fraction of a trip, it will make a total of 666 trips.

9. Finally, to calculate the total distance the beetle flies, we multiply the number of trips by the round trip distance:
total distance = number of trips * distance covered by trains
total distance = 666 trips * 3 miles
total distance = 1,998 miles

Therefore, the rhinoceros beetle will fly a total distance of 1,998 miles before being smushed between the two train engines.