from hadith text we can see Muhammed(pbuh) first prohibit something forever/until the day of resurrection then allowing it on a later day .
First he forbade it on the day of khaybar forever (chronologically first event)
Sahih Buckary Volume 5, Book 59, Number 527:
Narrated 'Ali bin Abi Talib:
On the day of Khaibar, Allah's Apostle forbade the Mut'a (i.e. temporary marriage) and the eating of donkey-meat.
Sahih Muslim Book 008, Number 3265:
Muhammad b. 'Ali narrated on the authority of his father 'Ali that Allah's Apostle (may
peace be upon him) **on the Day of Khaibar prohibited for ever the contracting of
temporary marriage** and eating of the flesh of the domestic asses.
Book 008, Number 3266:
'Ali (Allah be pleased with him) heard that Ibn Abbas (Allah be pleased with them) gave
some relaxation in connection with the contracting of temporary marriage, whereupon he
said: Don't be hasty (in your religious verdict), Ibn 'Abbas, for Allah's Messenger (may
peace be upon him) on the Day of Khaibar prohibited for ever the doing of it-And eating
of the flesh of domestic asses.
He allowed it after Mecca victory (chronologically second event)
but there are hadiths which says Muhammed(Pbuh) allowed temporary marriage after mecca victory.then forbade it.
Muslim, Book 008, Number 3253:
Rabi' b. Sabra reported that his father went on an expedition with Allah's Messenger (may peace be upon him) during the Victory of Mecca, and we stayed there for fifteen days (i. e. for thirteen full days and a day and a night), and Allah's Messenger (may peace be upon him) permitted us to contract temporary marriage with women. So I and another person of my tribe went out, and I was more handsome than he, whereas he was almost ugly. Each one of us had a cloaks, My cloak was worn out, whereas the cloak of my cousin was quite new. As we reached the lower or the upper side of Mecca, we came across a young woman like a young smart long-necked she-camel. We said: Is it possible that one of us may contract temporary marriage with you? She said: What will you give me as a dower? Each one of us spread his cloak. She began to cast a glance on both the persons. My companion also looked at her when she was casting a glance at her side and he said: This cloak of his is worn out, whereas my cloak is quite new. She, however, said twice or thrice: There is no harm in (accepting) this cloak (the old one). SO I CONTRACTED TEMPORARY MARRIAGE WITH HER, AND I DID NOT COME OUT (OF THIS) UNTIL ALLAH'S MESSENGER (MAY PEACE BE UPON HIM) DECLARED IT FORBIDDEN.
. Muslim, Book 008, Number 3257:
'Abd al-Malik b. Rabi' b. Sabraal-Juhanni reported on the authority of his father who narrated it on the authority of his father (i e. 'Abd al-Malik's grandfather, Sabura al-juhanni): ALLAH'S MESSENGER (MAY PEACE BE UPON HIM) PERMITTED US TO CONTRACT TEMPORARY MARRIAGE IN THE YEAR OF VICTORY, AS WE ENTERED MECCA, AND WE DID COME OUT OF IT BUT HE FORBADE US TO DO IT.
Question Isn't it contradictory when he first forbade it forever until the day of resurrection on the day of khaybar(which happened before Mecca Victory ) and then allow it temporarily before forbidding it ?