Even though we understand why that cyclist didn’t notice the second train coming their way, the fact that they came that close to getting hit by a train and got away with it has, we presume, got a lot to do with lady luck.
As you can see in the following video, before this incident took place the cyclist was waiting on another, much slower train to pass, before they could cross the railroad.
That first train unfortunately hindered his sight of the oncoming yellow train. The sound of the second train was also probably shrouded by the first, meaning that the cyclist simply assumed he had a clear path to reach the other side of the tracks.
Up until that point, the cyclist’s actions were, let’s say, OK. However, when you cross the tracks, you must always check on both sides; there’s no rule that says if one train has just passed another can’t show up on the adjacent (or even the same) track.
So while the cyclist managed to escape what would have surely been a fatal accident, it was still way too close for comfort.