Thus twelve year period of exile was about to end. Pandavas decided to pass the last additional (thirteenth) year incognito, as decreed, in the capital city of the King Virata. For this purpose, lest they should be detected, Pandavas disguised themselves as follows:
Yudhisthira -- As he was well versed with both the scriptures and skills of dice, rules and functioning of royal court, Yudhisthira decided to serve the king in the capacity of his adviser and priest. He assumed the name as Kankanbhata.
Bhima - His mighty and huge body required much food to satisfy his appetite. Therefore, Bhima decided to work in the Royal kitchen as the chief cook assuming the name of Ballava.
Arjuna - Arjuna was destined to pass one year as eunuch (thanks to the curse of Urvashi of Heaven). Therefore, it was decided that he teach dance and music to the princess Uttara in the guise of eunuch assuming the name Brihnnala.
Nakul became Granthic, the caretaker and guard to the horse stable as he was expert in the training and treatment of horses.
Sahadeva was in charge of cow-sheds and was called as Tantipal.
Draupadi was appointed as the chief maid-servant to the queen. She was to be known as Sairandhri.
Thus, separately, without letting others know that they were related, all the Pandavas entered into the service of the King Virata in the hope that the agents of Kauravas would not be able to spot them and inform Duryodhana about their hide out.
Keechaka was the brother-in-law of King Virata and he was also the commandar of the King's army. [The son of the King was Utar and his daughter's name was Uttara. Arjuna in the disguise of Brihanala was teaching the king's daughter Uttara. And when the Kauravas attack King Virata, later, it is Brihanala and the coward Prince Utar who save the Kingdom.] Keechaka was powerful and lustful. He was attracted towards the beauty and youthfulness of Draupadi ('Sairandhri'), the maid-servant of his mother.
He started making passes at her and instructed his attendants to tell Draupadi to bring food and drinks to his room.
Draupadi was aware of his evil nature. Secretly she told the powerful Bhima about Keechaka and his overtures. The angered Bhima told her to accept Keechaka's invitation to go his room that night. Keechaka was blinded with lust and drinks. He waited that night for Draupadi to come to his room. But instead Bhima went with the glass of milk for Keechaka dressed in lady's attire like Draupadi!
The ensuing fight between Bhima and Keechaka was very intense as both were equally powerful. Bhima in the end prevailed and Keechaka was killed.
King Virata came to know all about the sad end to his ignoble brother-in-law. He was particularly displeased with him because he tried to take undue advantage of a maid. Death of such a disgraceful person, in fact, did not hurt the king in any way. He kept the matter within himself by announcing that his Keechaka would be away from the capital for a few months. In fact, King Virata fought on the side of Pandavas in the war.