There was a sage Vishwamitra. He was a master of all weapons. When he and other sages performed yagyas, then demons came there and spoiled yagyas. This happened many times. Vishwamitra was doing a long-duration yagya. Till the completion of the yagya he was not supposed to curse or kill anybody himself.
He went to Ayodhya and met king Dashrath. At that time Ram and Laxman were children. Vishwamitra knew that Ram and Laxman were not ordinary beings. So he said that Dashrath should send Ram and Laxman with him(Vishwamitra) because he wanted Ram and Laxman to kill the demons. Dashrath was shocked to hear that his sons, who were so small in age, had to fight the demons. Somehow Dashrath's guru Vashishth convinced Dashrath. Then Ram and Laxman went with Vishwamitra.
Vishwamitra taught Ram and Laxman all weapons and also imparted to them various other kinds of knowledge. Ram and Laxman killed many monsters.
There was another kingdom Mithila. Janak was the king of Mithila. Janak had an adopted daughter Sita. He wanted Sita to marry somebody really brave. He had a bow of Lord Shiv, which was very strong. In order to make sure that his daughter Sita marries somebody mighty, Janak put a condition that Sita will marry the person who can fix door on the bow. Many suitors tried their luck but they could not even shake the bow.
Vishwamitra reached Mithila with Ram and Laxman. Ram lifted the bow and very easily broke it. Janak was overjoyed to see this and happily agreed to marry Sita to Ram. Janak's another daughter Urmila married Laxman. Janak had a younger brother Kushdhwaj, who had two daughters Mandavi and Shrutkirit. Mandavi married Bharat and Shrutkirti married Shatrughan.