Vishnu Purana tells us an interesting story of how two princes, hostile to each other, were ultimately united in Brahmavidya. Amitadhwaja and Kritadhwaja were the sons of King Dharmadhwaja. Kesidhwaja, the son of Kritadhwaja, became an accomplished master in Brahmavidya; Khandikya Janaka, the son of Amitadhwaja, turned into an expert in Karma-kanda, the part of Vedas dealing in yagnas and other rituals. As things turned out, both became inimical to each other and ultimately Kesidhwaja expelled Khandikya to the forest. Though Kesidhwaja knew the secrets of Brahmavidya, he was very keen in observing in practice the rituals of Karma kanda. Once his cow, used for giving milk in yagnas, was killed by a lion in the forest. Asked about the prescribed atonement for this sin, none of Kesidhwaja’s learned priests could advise; he was told to approach Khandikya, who alone had the knowledge to handle the delicate transgression.
Kesidhwaja decided to approach his brother even at the cost of his life. In the forest, Khandikya thought that his brother had come there to kill him. His advisors told him to fight and kill his brother who had come alone and enjoy the kingdom. Khandikya however decided that he would not harm his brother; he would rather make sure of his conquest of the higher world. He therefore made Kesidhwaja aware of the details of the necessary Prayaschitta. Kesidhwaja returned and completed the yagna accordingly and was very happy. He then remembered that he owed Guru-dakshina to his brother Khandikya, without whose guidance the yagna would not have been complete. He mounted a chariot and proceeded to the forest.
Khandikya again thought this time that his brother had come only to kill him. But Kesidhwaja apprised him of his intention to give Guru-dakshina. Khandikya’s ministers thought that this was the right opportunity to seize the kingdom from Kesidhwaja, who would give anything asked for as Guru-dakshina. But Khandikya thought otherwise. He asked his brother to teach him Brahmavidya. It is interesting to note that Kesidhwaja, the master of Brahmavidya was ensnared by desire to enjoy more and more of mundane pleasures and hence he started performing Kamya yagnas. Khandikya, an expert in Karma-kanda developed detachment, living in the forest and sought Brahmavidya. Kesidhwaja now bestowed on him that rare knowledge.
Avidya consists in considering the body, which does not belong to us as Atma. The jiva develops false identification with the body made of the five elements, resulting in attachment and ownership of objects connected with the body. These objects are also made of the five basic elements, Akasa, Vayu, Fire, Water and Earth and are all perishable. The jivatma comes under the sway of Prakriti and consequent ego and starts to perform actions for satisfying the body. These actions may appear to result in pleasure; but because the pleasure is short-lived, the craving is never satisfied fully. The end result is always sorrow. In the process, the jivatma completely forgets its real innate nature of Bliss and undergoes enormous suffering. Just as water in a vessel on fire is heated by association with the vessel, though it has no direct link with the fire, so also the jivatma suffers by false association with the body.
Mind is the only cause for bondage and liberation of men. The wise one therefore detaches the mind from all objects other than Paramatma. He thinks only of Paramatma. This is the real yoga of one who seeks liberation with all his heart. Just as magnet attracts a piece of iron in proximity, Paramatma exerts a pull on the mind in this condition and thus helps the seeker. Following the traditional procedure of Ashtanga yoga, the sadhaka should observe virtues like brahmacharya, non-violence, truth, non-stealing and non-possession with no expectation. He should engage with a controlled mind in vedic study and austerity, taking care to maintain purity and contentment. Constant practice of yama, the control of sense-organs from indiscriminate external run and niyama, the observance of mental discipline ultimately leads to liberation even while in human body.
The yogi should sit for meditation in a convenient prescribed posture, Asana and do Pranayam. Control of Prana can be with focus on a mantra or idol or on the formless Paramatma. Now follows Pratyahara, compelling the sense-organs to return from roaming in constantly changing external objects to Paramatma, who is the desired focus of the mind. For meditation, it is easier in the initial stage to form a good mental picture of the Ishta devata (note: Vishnu Purana refers to the form of Vishnu in this context) and focus the mind on this form, rather than on the formless Supreme. This is called Dharana. The yogi does not fail to realise that the entire creation is but the apparent form of one Paramatma and that he has chosen to train his mind on one favourite form. Just as fire aided by wind burns away a large bundle of grass in no time, the Ishta devata thus concentrated upon destroys all sins of the yogi. Continuous concentration of the mind on the form of the devata like the unbroken flow of oil is known as Dhyana. Because of this intense absorption of the mind, the mind loses itself in due course and merges with the Ishta devata and eventually with the formless Brahman. This state is called Samadhi, where the trinity of the meditator, object of meditation and the act of meditation disappears, yielding place to only one entity, viz. the devata. This is the ultimate state of Bliss. With practice this will lead to the yogi never losing the thought of the Ishta devata even for a moment, even while engaging in normal mundane activities. Dispassion and true knowledge are the tools on this course and it is only Brahman that is the goal to be attained and worth striving for.
Khandikya responded to this holy preaching by saying that all his mental impurities had vanished just by listening to the elucidation of Mahayoga. He acknowledged that the false sense of I and mine would no longer remain with the Gnani, who has realised the Supreme in himself. Kesidhwaja returned to his city and engaged in royal activities including vedic rituals with no attachment to results, while Khandikya went into solitude to engage in the yoga he had learnt. Ultimately both merged in Brahman.