Queen Jadwiga was only ten years old in 1384. But her mother Elizabeth sent her north from Hungary to become the Queen of Poland. Elizabeth stayed behind to rule Hungary as regent for Jadwiga’s older sister. By 1385, when she was twelve, Queen Jadwiga married Jogaila, the Duke of Lithuania. That united Poland and Lithuania to form a bigger empire. Now they could defend themselves against the Holy Roman Empire to their west and Russia to their east.
So from 1385 AD on, Poland and Lithuania were united in one empire. Duke Jogaila converted to Christianity. He took a new Polish name, becoming King Wladyslaw II. Wladyslaw and Jadwiga’s empire covered not only modern Poland and Lithuania, but also a lot of what is now Belarus and Ukraine. This empire was big enough to defend itself successfully against Mongol invasions from the east and German invasions from the west. Jadwiga died of infection after childbirth in 1399, when she was 25 years old. But Wladyslaw II ruled for an extremely long time – 48 years! That gave him time to really lock Poland and Lithuania together as one empire.
By 1500 AD, the Polish-Lithuanian empire also controlled Bohemia and Hungary. That gave the Polish kings control over pretty much all of eastern and central Europe. But then Czar Ivan the Great of Russia took over a lot of Lithuania. And in 1526, Suleiman’s Ottoman Empire attacked Hungary, and won a big battle there. Louis II, the king of Hungary and Bohemia, was killed in the battle. So the Ottomans took over the eastern half of Hungary, and the Austrians took over the western half. That started the Austro-Hungarian Empire. Poland became smaller and weaker, but it was still there.