Ever since the episode "The King of the Delta Blues", Jiya had premonitions that predicted that Rufus would be killed on a time travel mission, surrounded by cowboys. It took time and effort for Rufus and Jiya to reconcile this vision, but Lucy Preston eventually convinced Jiya the reason she was getting these visions was so she could save Rufus.
In the episode "Chinatown", Jiya is able to hone her ability to see into the future, due to the advice of Stanley Fisher, and she knows that one of Emma Whitmore's goons is to fatally stab Rufus at 7:00 on August 26, 1888. In her visions, there was a gun that Jiya wasn't fast enough to grab to stop the killing. When her visions come to pas, she is able to react fast enough to shoot Jimmy dead before he stabs Rufus, preventing the killing she predicted.