His father wanted him to become world known so he kept him in the palace and kept him secluded from the world outside. Until one day while in a parade outside palace walls he witnessed sickness, old age, and death. These visions shocked him and made him want to become a wandering ascetic out to find the cause of suffering. In the end he did become an enlightened one and from that point on set out to show people how meditation and following a Buddhist lifestyle will lead everyone on the right path.
Next there is the writings of both these religions. Hinduism's writings come in many forms. The Rig Veda was probably the first written which had hymns in it. There are philosophical texts to epic stories and they span many time periods. Hindu scriptures are written in Sanskrit, which is the ancient language of India. There is the Upanishads, which are later groups of writings that reflect a decline in the importance of the sacrificial rituals. The Puranas show another stage of Hinduism. These books are mythological epics describing the exploits of Vishnu or Shiva. Lastly there is the Ramayana that is one of the two great epics. It was a popular folk story before it was written down as a Sanskrit text. It tells the story of King Rama, who was another famous avatar of Krishna.
In Buddhism the writings fall into two main groups which are ones that were spoken by the Buddha and writings of sages and scholars. The Therevada scriptures were for several centuries' teachings of the Buddha that were passed down orally by the Sangha, the community of Buddhist monks and nuns. The teachings are written in an Indian language called Pali "which the Buddha himself spoke. The Pali Cannon is the conversations and teachings that the Buddha gave at different times. It is in many volumes and is divided into three parts called the Tripitaka, which means "Three Baskets". Then there are the Mahayana scriptures that were written in Sanskrit during the first century CE.