This is my 9th grade Algebra homework word problem that I'm currently having trouble understanding exactly what to do;

"Two trains are on the same track a distance of 100 km apart heading towards one another, each at a speed of 50 km per hour. A fly starting out at the front of one train flies towards the other at a speed of 75 km per hour. Upon reaching the other train, the fly turns around and continues toward the first train. How many kilometers does the fly travel before getting squashed in the collision of the two trains?"

Any help would be greatly appreciated, thank you!