All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
This person’s prayer is not rendered invalid because of the prayer time ending, and he is not obliged to repeat it with the intention of making it up; rather he should complete his prayer. Holding the intention of performing the prayer in its due time or that of making it up is not an obligation. It is enough for the worshipper to specify the prayer he is performing – Thuhr, ‘Asr, Maghrib, ‘Ishaa’ or Fajr – and it is not incumbent on him to specify whether he is performing it in its due time or making it up.
Al-Mawsoo‘ah Al-Fiqhiyyah (The Fiqh Encyclopedia) reads: "Muslim jurists held that, in general, it is not incumbent on the worshipper to specify whether he is performing it in its due time or making it up (after the end of the prayer’s time) in his intention to pray . . . . The Hanafis maintained that (as quoted by Ibn Nujaym), “If the worshipper specified in his intention which prayer he is performing, his prayer is valid whether he held the intention of performing it in its due time or that of making it up.”
Allaah Knows best.