Mayhew gave Philadelphia a 3-2 lead at 16:09 of the third period when he tapped in a pass from Sanheim in the crease.
The lead lasted 54 seconds before Hathaway scored the first of his two goals.
"We played 57 minutes the way we did," Philadelphia coach Mike Yeo said. "You leave the game feeling that way, that's pretty tough."
The Capitals' fourth line of Hathaway, Nic Dowd (two assists) and Carl Hagelin (two assists) combined to score seven points.
"We've been playing really well lately," Hathaway said. "And that goes into 'Hags'' speed and turnovers, and 'Dowder's' been unbelievable on the draws. I think we're controlling the puck a little bit more down low and you're seeing, with cutbacks or puck possession ... we had a lot more movement in the offensive zone, rather than just getting it, being stationary and throwing the puck away. I think we're starting to make plays. We're being a little more aggressive, I guess, to try and attack the net."
Laviolette said it's become expected for that line to contribute offensively.
"They've done an excellent job the last couple years," he said. "They have a good identity. What you see from them is their identity and they bring that pretty consistently on a nightly basis. And they're able to produce as well. It's not just about defense for them. They have that same identity in the offensive zone, and it generates chances."
Kempny gave Washington a 1-0 lead at 18:35 of the first period. It was his first goal since Oct. 25, 2019 (61 games).
Mayhew tied it 1-1 with a power-play goal at 8:54 of the second period.
"I just try to get to the net where the pucks are," Mayhew said. "That second goal I scored was a great play by [Sanheim]. When you go to the net good things happen, so I am going to try to continue to do that."