History only tells us that Bajirao and Mastani existed and were married to each other. Marathi authors at the turn of the 20th century were creative with the rest.
Bajirao was the Peshwa during 1720-1740. He's considered to be the most powerful of all Peshwas, and the best Maratha administrator and military general after Shivaji himself. At the time of his reign, Chattrasal was the ruler of Bundelkhand. He was constatntly warring against the Mughals and the Nawab of Oudh/Awadh. In one of his military campaigns, when his kingdom was at great peril of being completely overrun by his enemies, he sought the help of the Marathas under Peshwa Bajirao. Bajirao responded and helped Chahtrasal save his kingdom and his life. As a mark of respect, Chattrasal gave him 1/3rd of his kingdom, and his beautiful daughter Mastaani (who was from a Muslim wife) in marriage to Bajirao. Mastaani was trained in both political administration and military skills.