Still not so good on your reading comprehension eh Vendy?
;-)
The question was:
"If you can solve the riddle of "Which came first,the chicken or the egg" you can solve this mystery once and for all."
That question was answered in full - several times.
Your question - "Where did the egg come from" has also been answered:
Amniotic eggs arose some 340 million years ago amongst a group of amphibious tetrapods who had adapted to life on land to the extent of developing water-tight eggs which could survive in a terrestrial environment.
Selection pressures would have been the high rate of predation of eggs in an aquatic environment so the laying of eggs in a relatively predator-free environment like the largely unoccupied land would have been an evolutionary advantage.
One example of such an early amniote tetrapod is Casineria.