Quran 5:20
Its explanation is given in Al Bayan. The foreknowledge was given to them in the form of promise from God earlier. Moses mentioned it in the past tense, so show it will definitely happen. This is a style in language to show definiteness of a future happening.