Goals from Yaya Toure, David Silva, Sergio Aguero, John Stones and a Havard Nordtveit own goal made it a comfortable night for Guardiola’s men.
They will now be in Monday’s draw for the fourth round.
The Catalan was delighted with his team’s performance and insisted it showed the ability they have.
He said: “It’s always important to win away. It’s not easy and at West Ham it was difficult but hopefully this will help our players to believe they are good enough.
“All the season they have run a lot and will fight a lot and sometimes they have played good. They have to believe they are good enough to compete with every team.”
City had over two thirds of the possession and were in control of the match at the London Stadium from early on. Guardiola believes this was the most important aspect of his side’s victory.
“We were able to keep the ball more than the last games where it was almost impossible and we were much better in that sense,” he said.
“We created more chances and conceded few chances so that helped us a lot. Before the penalty we had three or four clear chances and after that goal it made it easier for the second half.”