The fly

 
 

Puzzle Question: 

A fly is flying between two trains, each travelling towards each other on the same track at 60 km/h. The fly reaches one engine, reverses itself immediately, and flies back to the other engine, repeating the process each time.
The fly is flying at 90 km/h. If the fly flies 180 km before the trains meet, how far apart were the trains initially?

Toughness: 
Intermediate