With the help of Lord Allah; He helps whom He wishes, and He is the Exalted, the Merciful.
During the revelation of these verses, the Romans and Persians were powerful nations in the world. Romans were the Christians (People of the Book) and Persians were Fire worshipers. The Persians conquered Palestine which was under Roman rule. This rejoiced the Meccan Pagans and saddened the followers of Messenger. So to console the believers, Lord revealed these verses promising a victory within three to ten years.
Then after Messenger migrated to Medina on the 2nd years of Hijra, the first battle of believers with Meccan Pagans has happened. With the help of the Lord, believers defeated the powerful Meccan Pagans. And at the same time, the Romans defeated the Persians. These rejoiced the believers.
Three-Time-Knower Lord has decided and inscribed in His Book Adhikr whatever thing happens in the universe as explained in verse 10: 61. See explanation 6: 115; 8: 19; 27: 75 and 91-93.