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. We ask Allaah to exalt his mention as well as that of his family and all his companions.
The above supplication is part of a narration reported by Muslim that was narrated by 'Awf Ibn Maalik when supplicating for the dead. The meaning of the term 'exchange for him' is give him a substitution, and 'his home for a better home' means the first home is the worldly life, and the second home is the Hereafter, and this includes the life between the grave and the Day of Resurrection. The meaning of 'family for a better family' means servants, and it is probable that the meaning is the family in general.
Allaah Knows best.