PHILADELPHIA — Here’s how it seems to work: Alain Vigneault makes a lineup change, and the Rangers win the first game then lose the second.

That pattern has followed suit yet again for Tuesday night’s 5-2 loss to the Flyers, tying this best-of-seven contest and forcing a decisive Game 7 back at the Garden on Wednesday.

It was the second consecutive game rookie forward J.T. Miller played and the team lost — just as it lost in the second game Jesper Fast played (Game 2) and the second game Dan Carcillo played (Game 4), leaving the Rangers coach with an interesting decision to make for Game 7.

In the absence of top-six forward Chris Kreider — who is assumed to still be unavailable after now missing 15 straight games following left-hand surgery on March 28 — Vigneault had a lineup decision to make when the series began.

In Game 1, he kept 22-year-old Fast in lineup after playing the season’s final three games, and Fast collected an assist in his postseason debut, a game the Rangers won, 4-1. He played in Game 2, and they lost, 4-2.

In Game 3, the first in Philadelphia, Vigneault replaced Fast with former Flyers instigator Carcillo — who subsequently went out and scored a goal in a 4-1 win. Carcillo played again in Game 4, and the Rangers lost, 2-1.

Then in Game 5 back at the Garden, Carcillo came out for the 21-year-old Miller, who notched an assist in his own playoff debut, a 4-2 Rangers win.

As Miller remained in for a second straight game on Tuesday, he played a total of 12:00, got an assist on a meaningless late-game goal — and the team still lost.

With top-four defenseman Nicklas Grossman out for the rest of the postseason after an ankle injury suffered in Game 4, the Flyers went with 25-year-old defenseman Erik Gustafsson over Hal Gill, the lumbering veteran who played in Game 5. The decision paid off.

Gustafsson scored on a second-period breakaway after coming out of the penalty box, his second career postseason goal.

“I made a bad read on the breakaway,” said Rangers goalie Henrik Lundqvist, who came out to play the puck before retreating and having Gustafsson beat him five-hole. “You don’t want to analyze it too much.”