It was a harsh scoreline on Justin Edinburgh's Newport with two of the strikes coming in the closing seconds.
Nevertheless, Ferguson is keen to see Posh to go all the way to the Wembley final and his side will now look to overcome Swindon over two legs in the area final with the first leg at London Road in the week commencing February 3.
Ferguson said: "We're two games away. We know what the carrot is. There are only three of my players who have played at Wembley before.
"The motivation is certainly there. It was one of our main targets at the start of the season and now we're two games from getting there. Hopefully we can finish the job."
South African left-back Nthe, 19, scored only his second goal in senior football in the 13th minute as the ball squirmed under Jamie Stephens.
The Newport goalkeeper injured his hamstring in the second half and McCann's deflected shot in the 90th minute found its way past substitute Lenny Pidgeley before Mendez-Laing netted with almost the final kick of the game, leaving Ferguson content with the victory.
"I'm pleased and we are back to what we were like at the start of the season," he added.
"A few of the players went through a loss of form. But they have played themselves through it.
"After such a bad run we have won three games in a row, no goals conceded and nine goals scored.
"They (Newport) pressed us and made it difficult. We couldn't get our passing game going because of the pitch. It was really lively and bobbly. Newport get the ball in the box and we had to deal with that.
"Our quality came through at the right time and it's a really good win for us."
- Sports & Recreation