Tawaf al-wada` should be the last thing a pilgrim does before leaving Makkah. It is reported that ibn `Abbas (may Allah be pleased with him) said: “The people were commanded that the last thing they should do in Makkah was to circumambulate the Ka`bah, but an exception was made for menstruating women” (Al-Bukhari and Muslim).
Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada , states:
If a muslim finds their selves in a certain circumstances that makes them engage in other activities after Tawaf Al-Wada` then they need not worry about the mistakes made unintentionally in that regards. Although the majority of scholars are of the opinion that Tawaf Al-Wada` is best done immediately prior to leaving Makkah, but in special cases, muslims are excused. As we have the option of following the view of Imam Abu Hanifah: According to him, Tawaf Al-Wada` is still considered valid, even though a person had engaged in other activities after having performing it. In his view, Tawaf Al-Wada’ must not necessarily be done immediately prior to one’s departure; for it essentially means that it is the last of the rites of Hajj associated with the Sacred House.
In conclusion, there is no offering a expiation for this kind of mistake; and the Tawaf is still considered valid. Allah the Almighty has not appointed any hardship for us in our religion. The mercy of Allah the Almighty is inherent in the fact that our great imams have held divergent views, and in their divergence of views there is always mercy. This is because a person who encounters hardship can opt out for the flexible view in another school, even though he usually follows another school in the majority of issues.