The 99 miles gave Matt Nagy time to think.

He would pull out of his driveway from his home in Lancaster, Pennsylvania, at 3:30 a.m. and head to the Eagles’ NovaCare Center in Philadelphia. The trip took an hour and a half, or two with traffic.

It was 2010, Nagy’s first year as a full-time NFL employee. The people who later would prove most influential in Nagy’s career — from Doug Pederson to then-Eagles head coach Andy Reid to future Chiefs general manager Brett Veach — helped him once he got his foot in the door. He was a low-level coaching assistant, working below Pederson, who was the offensive quality-control coach.

At the time, Nagy wasn’t ready to move his family from Lancaster.

“There was a lot of reflection, I know that,” Nagy said Wednesday. “Wondering, ‘What in the hell am I doing?’

“But it paid off.”

Sunday, he’ll face Pederson in the wild-card round of the playoffs.

“When you get into the coaching business, you have to love the grind, you have to love the process,” Pederson said. “Right away you could tell that Matt did both of those.

“Of course, he has a passion for football — he loves the grind, he loves the X’s and O’s. Right away you could tell that he was going to work himself up the ranks. When a door opened, if given the opportunity, he was gonna step through it and make the most of his opportunities. And that’s what he’s done.”

Nagy and Pederson became fast friends with the Eagles. In Nagy’s first year, they’d jog during their offseason lunch breaks to get out of the office. They’d eat ice cream late at night at work, with Pederson opting for vanilla soft serve with rainbow sprinkles.

Nagy moved out of Lancaster in 2011. The next year, he and Pederson helped the Eagles find quarterback Nick Foles. After watching film with Nagy, Reid called Pederson and told him to divert his flight to Arizona, where Foles played in college.

Nagy and Pederson still play golf and cards against each other. Their wives are close. Pederson’s three boys are older than Nagy’s four, so Nagy has a sense of what to expect in the coming years.

Pederson was the Chiefs’ offensive coordinator in 2016, when he was hired to be the Eagles’ head coach. Any hope he had of taking Nagy to be his offensive coordinator was squelched by Reid, who said he couldn’t poach assistants.

Like Pederson did when he won the Super Bowl last year, Nagy has meshed a hybrid West Coast-spread offense that features run-pass options with a dominant defense. Pederson said Nagy has put his own stamp on the Bears’ offense, though, with his unique formations and pre-snap motions at the goal line. Pederson can see the influence of former Oregon coach Mark Helfrich, now the Bears’ offensive coordinator, on the running game.

RELATED

• It’s not a family reunion for Kyle Long: ‘I gotta figure out a way to beat him’

• The rust is history: With Trubisky back on track, Bears have a path to the title

Even with the tweaks, the offenses are as alike as the men themselves.

“I would say the biggest way they are similar is they both tell their players to ‘Let your personality show,’ ” said tight end Trey Burton, who played for Pederson from 2016 to ’17. “They let the players do whatever they want to do. They don’t have this strict hammer of ‘You can’t do this’ or ‘You can’t do that.’ Obviously, there are rules and things like that, but allowing us to be loose and letting us do whatever it is we have to do to prepare to play, that’s what they let us do.

“Nagy is a little more fiery than Doug is, but they are both very similar.”

Pederson needed help from his friend to reach the playoffs. He called him six days before the season finale, reminding Nagy that the only way the Eagles could make the playoffs was with a Bears win in Minnesota.

After the Eagles took care of business against the Redskins and the Bears eliminated the Vikings, Pederson thanked Nagy. Pederson told Nagy how proud he was of his first season. He then asked him for restaurant recommendations when the Eagles got to Chicago. Nagy picked the sandwich shop Capriotti’s and Gino’s East.

“I still got a lot of pizza places I gotta get to,” Nagy said. “But I can’t do that yet.”

He has football to coach.

“I think of my career and where I’ve been,” Pederson said. “Matt and I parallel a lot, and I think we both have that servant mentality, where we just want to help our teams win and serve the players, serve the coaches.

“And you see that with him. And it’s a credit to him, his eagerness and willingness to work and his desire to succeed.”