Two people narrowly miss being hit by a train