If the traveller wipes over his khuffs, then arrives at his destination, he must work out how much is left of the time for the non-traveller to wipe over his khuffs
Question

The traveller may wipe over his socks for three days and three nights, but if the traveller reaches his city before that time has ended, should he stop wiping over his socks, on the grounds that he is now a non-traveller, or may he complete the time for wiping over the socks that is allowed for one who is travelling?
Praise be to Allah.If the traveller is wiping over his socks, then he returns to his home city, he has no right to wipe over them for more than one day and one night (twenty-four hours). If he had been wiping over his socks whilst travelling for less than one day and one night, then he may continue to wipe over them for whatever remains of that one night and one day. If he had been wiping over them for more than one night and one day whilst travelling, it is not permissible for him to wipe over them any longer than that (once he has reached his destination).
Ibn Qudamah (may Allah have mercy on him) said in al-Mughni (1/181):
If a traveller wipes over his khuffs for less than one day and one night, then comes home, he may continue to wipe over his khuffs as a non-traveller, then he has to take them off. If a traveller was wiping over his khuffs for one day and one night or more, then he came home, he must take them off. This is the view of ash-Shafa‘i and ashab ar-ra’y. I do not know of any difference of scholarly opinion concerning that, because he is now a non-traveller, and it is not permissible for him to wipe over his khuffs for the same length of time that is allowed to the traveller. End quote.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said:
If someone wipes over his socks whilst travelling, then comes home, he may complete the time allowed for a non-traveller, if any of that time is left. If that time has ended, he must take off his socks.
For example, a traveller comes home and the time for prayer begins. He had been wiping over his socks, then he reached his city. In this case, he may continue to wipe over his socks for the period allowed for one who is not travelling, because wiping over the socks for three days is only for one who is travelling, but now he is no longer travelling. Just as it is not permissible for him to shorten his prayers once he reaches his home, by the same token it is not permissible for him to continue to wipe over his socks for the time that is allowed for a traveller.
If he has been wiping over his socks for one day and one night whilst travelling, then he reaches his home, he must take off his socks. If he has been wiping over his socks for two days whilst travelling, he must take off his socks. If he has been wiping over his socks for one day, he still has one night left."(Ash-Sharh al-Mumti‘  1/251).
And he (may Allah have mercy on him) also said:
If he wiped over his socks when he was travelling, then he reached his home, he may continue wiping over his socks on the grounds that he is now counted as a non-traveller, according to the more correct view, if there is anything left of that period within which it is permissible for him to wipe over his socks [that is, one day and one night]. Otherwise he must take off his socks when doing wudu’ and wash his feet."(Majmu‘ Fatawa Ibn ‘Uthaymin 11/176).
But if the opposite happened, meaning that he was wiping over his socks when he was not travelling, then he travelled, he may continue to wipe over his socks for the three days and three nights that are allowed to the traveller, including the time during which he wiped over them at home.
This has been discussed previously in the answer to question no. 111874 .
And Allah knows best.