BUFFALO — There has been a shift in the dynamic as the Rangers approach the Feb. 25 trade deadline.

The Post has learned that general manager Jeff Gorton is now engaged in an ongoing dialogue with the agents for pending free agents Mats Zuccarello and Kevin Hayes as the Blueshirts weigh extending the contracts of two of their best players against the return they might get for either or both on the market.

Cap considerations for 2019-20 and beyond are also a major part of the equation. There is, we are told, considerable distance between the parties, but that is to be expected as the negotiating process with each player is in a relatively early stage. The Blueshirts appear to have approximately $25 million with which to work next season, though the team could clear approximately $7.5 million of space by buying out Kevin Shattenkirk and Brendan Smith. Signing Hayes and Zuccarello would likely amount to between $11.5-and-$12 million.

As the drama intensifies, the Rangers continue to play credible hockey, 8-5-1 in their last 14 following their 6-2 victory (3-2 until 4:01 remained in the match) over a Sabres team masquerading as a playoff contender. The Blueshirts were engaged from the get-go, strong both on the forecheck and on the breakout while emerging with the puck in more than their fair share of battles.

“Quinney demands hard work,” Hayes said, referring to coach David Quinn. “He doesn’t care how long you’ve been here or who you are. If you don’t work hard, you’re not going to play. That runs right through the lineup.

“If you’re not having a good skills game, you’d better have a strong work ethic, play with energy and move your feet. If not, you’re not playing. That’s a major motivating force. Everyone is held accountable. He may yell a lot, but he gets his points across. So that drives us.

“But the biggest thing is probably Mika,” Hayes said of Mika Zibanejad. “He has to be one of the top three players in the NHL for at least the last month. We run through him right now. He’s been our motor. It’s been crazy fun to watch and be a part of.”

So of course the Rangers struck for six goals on a night when Zibanejad and linemates Zuccarello and Chris Kreider were held off the scoresheet. The Blueshirts got a major performance from Vlad Namestnikov, who broke a 23-game drought by getting the last two goals after Pavel Buchnevich redirected Hayes’ gorgeous pass past Linus Ullmark for the 4-2 lead. Linemates Jesper Fast and Ryan Strome complemented Namestnikov, who could be on the move at the deadline.

Citing declining work habits, Quinn scratched Filip Chytil, replacing the 19-year-old in the lineup with Connor Brickley, who combined with Boo Nieves and Smith — yes, Smith — to form an effective fourth line. Indeed, Nieves gave the Rangers a 1-0 lead at 4:09 of the first, capitalizing on strong work from his linemates.

Smith, recruited as a forward by Quinn at Boston University, moved back to defense when Brady Skjei left the game with an unidentified lower-body injury at 8:57 of the second period. Dressing seven defensemen paid dividends for this night.

“Pretty good, huh?” Quinn said, chuckling, of his lineup decision. The coach said that pending further evaluation, Skjei might be available for Sunday afternoon’s match in Pittsburgh.

This was hardly masterpiece theatre hockey. Hayes and linemates Buchnevich and Jimmy Vesey struggled through most of the first two periods, though Vesey did jam one in after Buchnevich won a puck battle and sent a one-armed pass to No. 26.

“Our team was really good except when we were on the ice,” Hayes said. “We were horrible in the beginning and really good at the end.”

Alex Georgiev backed up his 55-save victory over the Maple Leafs on Sunday with a very strong outing. The netminder was at his best early in the third period, stoning both Evan Rodrigues and Tage Thompson.

“You have to bring your best every game,” said Georgiev, who made 31 saves and is 3-1/1.73/.949 over his past four starts. “No matter what happened in [your] last game, that’s not important.”

The Rangers forge ahead, contract extension negotiations proceed and trade talks continue, nine days and five games before the deadline.