"There is no confusion," replied Vishnu. "Let me explain it for you."
Brahma was born from the golden egg right at the beginning, at the time of the original creation. But at the end of every kalpa there is a minor destruction when all living beings other than Brahma, Vishnu and Shiva die. When the destruction is over, creation has to start afresh.
At the end of the last kalpa, there was water everywhere in the universe. The heaven, the earth and the underworld, were all flooded with water. There were no gods and no sages. Only the great Vishnu slept on the water. He had a thousand hoods, a thousand eyes, a thousand arms and a thousand feet. This was his form of Ananta, the snake (naga).
(The Kurma Purana completely identifies Vishnu with Ananta. More commonly, the Puranas state that the snake Ananta was the son of Kadru and the sage Kashyapa. He pleased Brahma through his prayers and obtained from Brahma the boon that he would be permitted to hold up the earth on his hoods. The Kalika Purana specifically states that, at the time of destruction, Vishnu and Lakshmi rest on Ananta's central hood. The Vishnu Purana adds the information that Ananta was one of Balarama's avataras. The names Shesha Vasuki and Gonasa are often used synonymously with Ananta.)
While Vishnu thus slept on the water, a wonderful lotus sprouted from his navel. The lotus was gigantic and shone like the sun. Its fragrance spread in all directions. Brahma appeared inside the lotus. Since padma means lotus and yoni means place of birth, Brahma is also known as Padmayoni.
Brahma saw Vishnu sleeping on the water and woke him up. "Who are you?" asked Brahma.
"I am Vishnu." replied Vishnu. "I am the origin of everything. That will be there in the universe is inside my body."
"Is that really so?" asked Vishnu. "Let me see."
Vishnu thereupon entered Brahma's body. He really found the three worlds, the gods, the demons and the humans inside Brahma's stomach and was greatly surprise. He emerged from Brahma's mouth and told Brahma, "What I have seen inside your body is truly wonderful. But I too can show you many worlds inside my body. Please enter and see for yourself."
It was now Brahma's turn to enter Vishnu's body. But when Brahma did this, he could find no end to Vishnu's stomach. It was true that there were many worlds inside Vishnu's body. However, Brahma could find no way of coming out from Vishnu's stomach. He finally started to emerge through Vishnu's navel, through the stalk of the lotus that was there.
"How dare you try to confine me inside your body?" demanded Brahma, as soon as he managed to get out.
"Please do not get angry." replied Vishnu. "I merely thought that I would play with you for a while. Otherwise, it is inconceivable that anyone should dare to confine the great Brahma. Please pardon me. And as a token of your pardon, please grant me the boon that henceforth, you will be known as my son. After all, you did emerge from a lotus that grew out of my navel."
"Agreed." said Brahma. "Let us make peace. After all; there is no one else. We are the lords of everything, we are parts of the Brahman."
"Please do not forget Shiva," responded Vishnu. "Your words will anger him and bring about your undoing."
While the two were thus conversing, Shiva appeared on the scene. He had a third eye in the middle of his forehead and his hair was matted. A trident could be seen in his hand.
"Who is this fellow?" asked Brahma. "He looks like an upstart."
Vishnu calmed Brahma down. He also gave Brahma divine eyes so that Brahma could comprehend the true nature of Shiva. Brahma then started to pray to Shiva. Pleased with Brahma's prayers, Shiva agreed to grant Brahma a boon.
"Please grant me the boon that you will be born as my son," said Brahma.
Shiva agreed to do so and went away.
Brahma returned to his seat on the lotus flower.
Suddenly, two demons named Madhu and Kaitabha appeared. They were exceedingly strong and threatened to destroy everything that Brahma would create. Brahma therefore requested Vishnu to kill these two demons. Vishnu created two beings from his own body and these two beings killed the demons.
(The Madhu and Kaitabha story is given in greater detail in other Puranas, such as the Kalika Purana. While Vishnu was sleeping, the two demons were born from his ears. One of them desired to have some honey as soon as he was born. Since the word for honey is madhu, he came to be known as Madhu. The other one looked like an insect. Since the word for insect is kita, he came to be known as Kaitabha. These brothers attacked Brahma and Vishnu had to fight with them so as to rescue Brahma. The fight went on for five thousand years before Vishnu could kill them. After the demons were killed, the fat (meda) from their bodies formed the earth. That is the reason why the earth is known as medini.
After Madhu and Kaitabha had been killed, Brahma could start to create. He first created, through his mental powers, the sons whose names have earlier been mentioned. Since Shiva had promised that he would be born as Brahma's son, Brahma decided to perform tapasya so as to accomplish this. He prayed for many years, but nothing happened. In utter frustration, Brahma began to cry. The ghosts (bhuta and preta) were born from these tears. Brahma was so disgusted at having created these awful creatures, that he committed suicide. It was then that Shiva was born from Brahma's mouth and Brahma revived.
(You will have noticed the contradiction. Earlier, it had been stated that Shiva was born from a teardrop and there had been no mention of Brahma's suicide. The suicide is not mentioned in other Puranas either, nor is there any mention of Shiva or Rudra being born from a teardrop. In the Vishnu Purana, he suddenly appeared in Brahma's lap. In the Padma Purana, he was born from Brahma's furrowed brows).
The baby started to cry as soon as he was born.
"Don't cry," said Brahma. "Since you cried when you were born, you will be known as Rudra."
(The Kurma Purana is not specific on why the baby cried. The other Puranas state that the baby cried for the want of a name. Brahma therefore gave the boy the name of Rudra, as the word rub means to cry. The boy continued to cry and Brahma gave him several other names as well. The Puranas however disagree about what these various names were).
In addition to Rudra, Brahma gave the boy the names Bhuva, Sarva, Ishana, Pashupati, Bhima, Ugra and Mahadeva. In these eight different forms, Shiva was to live in the sun, the water, the sky, the fire, the wind, the trees, the bodies of brahmanas and the moon.