The ban on passing near a railroad crossing applies on the crossing itself and on the 100-meter stretch before it. Here you should calmly approach the crossing in your own lane: the gate may come down ahead or the red signal may come on, and a vehicle in the oncoming lane would be trapped. More than 100 meters from the crossing this ban doesn't apply, unless passing is banned by another rule