So Leary set off to deliver the two pizzas.
He told the Associated Press that his path to the stranded train included cutting through someone's backyard, going down a steep embankment, and hopping over a ditch filled with water.
One passenger, Mitchell Katz, took a now-viral video of Leary approaching the train, and posted it on social media.
After greeting him with cheers and applause, the grateful passengers tipped Leary a total of $32.
"It was funny," he told the Washington Post, saying that it was his first time delivering to a train. But he's also delivered to ballgames, campgrounds, stalled vehicles, and numerous other unusual places over the past 18 years.
Amtrak does not recommend having pizzas delivered to trains, even if they're stalled, telling the Associated Press that it is "extremely dangerous," and adding, "We are glad no one was hurt and hope this is not tried again in the future."