The Austrian-Hungarian Empire and Polish-Lithuanian Empire for instance. How did they benefit?
In the case of both these you bring forward is the ressult of succession crisis. Hungary in 1526 was left with no heir and the most powerful man in europe at the time Ferdinand I the Holy Roman Emperor was quick to press his claims on the Hungarian throne since Hungary and Austria had good relations dating back to when ottomans took Constantinople. Hungary became just an ordinary part of the Habsburg empire and the term Austro-hungary wasn't untill the late 1860's.
When in 1444 Władysław III of Poland died, he had no heir. So the Throne was pased to his Brother Casimir who was Grand Duke of Lithuania, when Casimir died his realm was divided between his sons. But after all but the youngest of Casimirs sons who died without legal heirs the Polish Lithuanian throne was again united under Alexander I Jagiellon, who then united the succession of the kingdom to make the king of Poland also grand duke of Lithuania