Praise be to Allah.
One of the conditions of tamattu‘ being valid is that ‘umrah should be done before Hajj during the months of Hajj. Then when the pilgrim has finished his ‘umrah, he enters ihram for Hajj. If he does Hajj ifraad, and then when he has finished the actions of Hajj he does ‘umrah, this is not tamattu‘; rather it is ifraad.
An-Nawawi (may Allah have mercy on him) said: With regard to tamattu‘, the original format is for the pilgrim to enter ihram from the miqaat of his country, then enter Makkah and complete the actions of ‘Umrah, then begin his Hajj from Makkah.
End quote from al-Majmoo‘ (7/168)
Al-Kaasaani (may Allah have mercy on him) said: With regard to tamattu‘, according to Islamic terminology, this refers to someone who is not a resident of Makkah who enters ihram for ‘Umrah and does the actions of tawaaf and sa‘i during the months of Hajj, then he enters ihram for Hajj in the months of Hajj, and does Hajj in the same year (as his ‘umrah).
End quote from Badaa’i‘ as-Sanaa’i‘ (2/168)
See also ash-Sharh al-Mumti‘ (7/82)
And Allah knows best.