My dear friend, sorry to disappoint you but nobody wrote Vedas.
Actually essence of Vedas was also present before the creation of this universe. The question should be, "when were they gifted to mankind?"
Actually Rishis didn't tell all Shlokas in a single time. They frequently kept telling them to their successors. First of all they materialized them in their hearts after a lot of Tapasya and then rendered to mankind.
According to the Bible, the history of mankind is 8000 years old. Therefore it has become the religious duty of western Veda researchers to determine the Veda’s age within this time. That is why the most of them and their Indian puppets decide Vedas birth time between 3500 years and 4000 years ago.
But As I said before Vedic Shlokas were not written on one place. They were added when Rishis appeared them in their hearts.
In Kalpa Sootra(Vivah Prakranam), there comes a sentence "Dhruva iv sthiraa bhava". On this German astrologer Jacobi wrote, "in the beginning the pole star was brighter than today." and this condition was about 4600 years ago.So even these Sootras are of that time.
On the time of Alexander, Greek scholar gathered the genealogy of Indian dynasties. At that time They had succeeded to get the record of 154 dynasties those had ruled for 6547 years authentically and Vedas were more ancient than them so. This took the age of Vedas between 8000 to 10000 years.
Lokmanya Bal Gangadhar Tilak didn't follow the previous researchers blindfold and made his own research. According to him in Aitarey or Shatpatha Brahmin Scriptures, stars were calculated with Kritika. That time days and night were equal (Vernal Equinox) on Kritika and now on Ashwini. According to astrology this change took place about 4500 years ago. So even Brahmin scriptures were before 4500 years ago. On the time of Mantra Samhita this calculation were done with MrigShira and condition is about 6500 years ago. So his research proves that some of Shlokas were written or given between 4500 years to 10000 years.
Narayan Bhavaniraav Pawage, the famous archaeologist also told Vedas are 9000 years old.
Dr. Sampoornanand wrote a book named "Aryon ka adi desh"( The eternal country of Aryans). He gave their ancient land a name that was "SaptSindhawa".And where there was this place, today there is Kashmir valley, Rajashthan and some part of UP.At that time Himalayan was raising from the ocean, that is why mountains were not stable and lots of quakes used to affect the earth. This condition was vividly described by Aryans in this way,” Humans! the one who stabled this vibrating earth, and placated these angry mountains and made motionless this Dyoloka, is Indra".(Rig-Veda)
Accord. to archaeologists, these unstable conditions were found between 25000 years to 50000 years ago and this condition was seen by the Aryans. So some of mantras are about 50000 to 25000 years old.
Some of Mantra gives the description of two seas in east and west while more ancient Shlokas give the vivid description of four seas. And these seas were around the land of Aryans where Vyas and Satluj River would mingle. Imperial Gazetteer of India (part 1) gave this ocean name Rajpootana Sea. IT was expanded in the south-east of Aravali Mountains. Still there are some lakes of salt water (Sambhar Lake) and the layers of salt prove that the area was devoured in "Rajpootana Sea".
And the fourth sea was present near Iran called "Asian Mediterranean Sea". Both of them have vanished when they mingled in European Mediterranean Sea. Still there are some signs of that sea in the form of black sea, Caspian Sea, Sea of Aral, Lake Balkash.All were once the Northern sea. Aryans gave description of all these seas because they were present that time and they used to do trade around them. According to archaeologists, these seas were present between 750000 to 50000 years ago. So some mantras are between those times.
According to Sanskrit Literature, we have come to know that Rig-Veda had 21 branches but today we have only one named "Shakal Samhita".Altogether all Vedas had 1131 branches out of them we have only eleven and half branches.
2)Krishna Yajurveda:-Taitareeya, Maitrayini and Kath.
3)Shukla " " :- Maadhyandin and Kanwa
4)Saamveda :-Kouthum, Ranayani, Jaimineeya
5)Atharwaveda :-Shounak and Paippalaad.
Also the Kath Kapishthil Samhita (half) (from Krishna Yajurveda) was found and published. So we can't exactly find out when those unfound Samhitas came into the existence for mankind.
And these are the ages of Mantras (between 4500 to 75000 years old) determined by many Vedas researchers astrologically, geographically and astronomically.
But we should not entangle ourselves in the questions like "Who wrote Vedas" “when they were given to mankind by the great Rishis?” or “What is the age of Vedas?” But we should read them and understand their essence that is Swatantra Sachchidananda ParBrahma Parmeshwar