This is an explicit statement from the Messenger of Allah ﷺ that the Middle Prayer is the ʿAsr prayer.
Concerning his words, “Whoever performs the two cool prayers,” the meaning is that one observes them in the manner commanded: within their prescribed times, and—if he belongs to those for whom congregational prayer is required, such as men—in congregation. Congregational prayer is obligatory, and it is not permissible for a man to forgo praying in the mosque when he is able to attend.
His second hadith is the Prophet’s saying: “If a servant falls ill or travels, there is recorded for him whatever he used to do while resident and in good health.” This means that if a person customarily performs a righteous deed and then becomes ill and unable to continue, the full reward is still written for him. Praise be to Allah for His blessings.
Suppose, for example, that it is your habit to pray with the congregation but you fall ill and cannot attend; it is counted as though you prayed in congregation, and twenty-seven degrees are recorded for you. Or imagine you travel, and while at home you used to perform supererogatory prayers, recite the Quran, and engage in tasbīḥ (saying “subḥān Allah”), tahlīl (saying “lā ilāha illā Allah”), and takbīr (saying “Allāhu akbar”). On the journey you are preoccupied and unable to do so; nevertheless, what you used to do while resident is still written for you. Even if you travel and pray alone in the open desert with no one else present, the complete reward of congregational prayer is recorded for you—provided that when you are at home you actually pray in congregation.
This alerts the rational person that as long as he enjoys health and free time, he should be eager to perform righteous deeds, so that if illness or some other preoccupation later prevents him, the full reward will still be written for him. Take advantage of your health, seize your free time, and perform good works; then, should sickness or anything else occupy you, the reward will still be recorded for you in full. All praise belongs to Allah.