The best solution is to dig out ballast between ties and run the hose under the rails, allowing normal rail traffic. Barring that, the best bet for firefighters is to notify the railroad of the need to stop rail traffic. CSX and Amtrak have both said that they will work with fire department to figure out a solution.
As an aside, a five inch fire hose getting hit by a locomotive will do quite a bit of damage. I have seen video of a fire department getting a supply line torn up by a train, damaging the fire engine and nearly killing several people. Could have been tragic for anyone in the burning building suddenly losing a water supply, too...
Even worse than leaving a critical hose on the tracks would be what Detroit did to Amtrak a few years back ( and has happened to others as well) is leaving a fire engine or truck on the tracks..
I save lives. What do you do?