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.
First of all, it should be mentioned that shortening the prayer when travelling is a confirmed act according to the majority of the scholars but this does not necessarily mean that it is an obligation, however, some other scholars stated that it is an obligation to shorten the prayer when travelling.
The distance which you mentioned in the question is a distance that permits one to shorten the prayer if it is one way, as the travel distance according to the majority of the scholars is 83 km. Therefore, whoever travels this distance is allowed to shorten the prayer whether he travelled this distance when going or when returning, he may shorten the prayer in both cases. When the time of the prayer is due while a person is travelling this distance, it is permissible for him to shorten Thuhr, 'Asr and 'Ishaa', and he may benefit from the permissions a traveller is given even if he intends to return to his town shortly. What should be taken into account is the distance and not the period of time. However, if one returns to his hometown before performing the prayers which were due when he was still a traveller, then there are two cases:
1- If he returns to his town before the end of the time of that prayer, in which case he should perform it without shortening it because it is only permitted to shorten the prayer while travelling.
2- If he returns after its time finished: The scholars have two opinions about the method of making it up; the correct view is that he should make it up without shortening it. This option keeps one on the safe side. This is the view we adopt here in Islamweb as in Fatwa 84877.
For more benefit on shortening the prayer in general, please refer to Fatwa 83821.