Rust made it 3-1 at 10:45 by scoring through the five-hole on the rebound of a Kris Letang shot.
"You have to just roll with the punches," Rust said. "I have to give a lot of credit to the guys. Everyone came ready to play. They knew the circumstances, and I think a lot of guys stepped up today."
Farabee poked the puck in after Jarry couldn't glove a shot from James van Riemsdyk, cutting it to 3-2 at 11:00 of the third period.
"Tonight, they just didn't go for us," Farabee said. "So we've got to regroup here. We're playing these guys twice more in a row here. We have to come out with a better effort."
Cody Ceci extended Pittsburgh's lead to 4-2 at 12:08 by scoring off a pass from Mark Friedman above the crease.
Mike Matheson scored into an empty net from beyond the red line at 16:06 for the 5-2 final just after Hart started to skate toward the bench for an extra attacker.
The Flyers were 0-for-5 on the power play, are 0-for-10 in their past three games and 3-for-30 in their past seven.
"We had our chances on the power play," Gostisbehere said. "We had a lot of shots. Odd bounces in hockey. Could've gone any other way."
NOTES: Flyers forward Travis Konecny returned after missing five games while in NHL COVID-19 protocol. He had two shots in 15:46 of ice time, including 4:31 on the power play. … Friedman and Josh Currie each made his Penguins debut. Friedman, a defenseman claimed off waivers from the Philadelphia on Feb. 24, had an assist and two hits in 10:25 of ice time. Currie, a forward, did not have a shot in 7:24. It was his first NHL game since April 4, 2019, for the Edmonton Oilers.