Your query is , " Why did Purusha Sukta from Rig Veda contain mention about Yajur and Sama Vedas ? " i.e. How can Rig_Veda contain references to Sama and Yajur vedas, which came later? And in comment section you also enquired about Atharva- veda. And you have quoted following verse from Rig-Veda Purusha Sukta.
तस्माद्यज्ञात्सर्वहुत ऋचः सामानि जज्ञिरे ।
Tasmaad-Yajnyaat-Sarvahuta Rcah Saamaani Jajnyire |
Jajnyire Tasmaad-Yajus-Tasmaad-Ajaayata ||9||
From that victim , in whom the universal oblation was offered , the
Richas and Samans were produced ; from him the meters were born ; from
him the Yajush was born . (H.H.Wilson )
Your questions are exactly explained and answered in the book Purusha sukta By Kamesvara Aiyar, B. V. The author here is explaning this mantra -
The mention of Rik , Yajus and Saman in this verse has led many
scholors to believe that the Rig Veda , the Yajur veda and the Sama
veda were alone were in exsistence at first , and Atharava Veda came
later on into existence . There is nothing in the verse to support
this view . the words richas ,samaani and yajus cannot here mean the
several compilations bearing these names.Such an interpretation
presumes that this verse must have been written after three distinct
compilations had been completed .
If so it has to be proved when and by whom , this verse came to be
written and inserted in the body of one of them. But the meaning is
plain and simple. At the time when many of the Hymns of Rig-Veda were
sung (Composed not compiled) , the ceremonial of the sacrifice had
been considerably developed ,And vedic songs and compositions had been
classified into three distinct varieties. The fundamentum division
being their subject matter , the sacrificial purpose they served and
their metrical and musical peculiarities. Thus any Vedic verse or
Passage must come under any of these three heads.
The author is explaining the fact that it is only in later times the three vedas were codified in three distinct books as per requirement. And Atharava Veda as a veda is made up of Ricks mantras only as your enquiry in comment section .(Page 50).
Thus atharva Veda also , as the song of this veda are ricks , though
many of them are not to be met with ( and necessarily so ) in the Rig
vedaic compilations. It was only at the later stage that these verses
and texts were codified into distinct books.
In Summery - The Ricks , Samaani and yajus mentioned in this verse are three different kind of mantas , distinctive by their properties and not the Rig ,Yajus and Saam veda compositions.
The vedas i.e. Rig Veda ,Yajur Veda ,Saam Veda contain these different kind of mantras each and were later compiled by Maharahsi Veda-Vyasa. But before this compilations the mantas were existed before in the memory of the people and were loose i.e. scattered. So There is no scope to the argument that this verse is later been inserted in the hymn as all the mantras of vedas were already present roughly around same time as of Rig Veda. But were not separated.