Margaret of Denmark was the daughter of the King of Norway; her husband, the King of Demark, was the son of the eldest daughter of the King of Sweden, none of whose sons survived into adulthood. When her husband died, followed shortly by the Kings of Norway and Denmark, she found herself the mother of the King of Norway, Denmark and Sweden, united in a toddler. She took power as regent, a move in which the chief ministers of all three nations acquieced with a good grace, and weilded that power for 16 or 17 years, until she felt her son was ready for the responsibility.
I am sorry to say this, but there is not much in your text that is correct.
Margaret was the daugther of Valdemar Atterdag, the king over Denmark
. She married the Norwegian king Håkon Magnusson that later also became his fathers coregent in Sweden. Margarets five year old son Oluf succeded his grandfather Valdemar Atterdag as Danish king 1375, and his father Håkon as Norwegian king 1380. The actual regent however were Margeret. Oluf died 1387 but Margerat remained to be Denmark and Norweys leader. She defeated The Swedish king Albrekt of Mecklenburg and took control over Sweden 1389.
No king were appointed in any of the three Scandinavian kingdooms until 1397 when Margarets sister's grandson Erik of Pomerania was elected to be the first king over the Kalmar union (Sweden-Denmark-Norway). But Margaret remained to be the real regent until her death in 1412.