In 933 King Rudolph II of Burgundy and King Hugh of Burgundy both wished to rule Italy. So they made a deal. Hugh traded his kingdom of Burgundy to King Rudolph of the other kingdom of Burgundy, thus forming the united kingdom of Burgundy or Arles, in return for Hugh getting the right to rule Italy undisturbed (by Rudolph at least).
So this is an example of a a king trading a kingdom to another king in return for the second king giving up his claim to a third kingdom.
In the Treaty of Utrecht in 1713, the Kingdom of Sardinia and the Kingdom of Sicily were granted to Charles VI, Emperor of the Romans and king of a bunch of kingdoms, and the other kingdom of Sicily was granted to Victor Amadeus II, Duke of Savoy, etc., and titular king of Jerusalem, Cyprus, and Armenia. In 1720 Victor Amadeus II was forced to exchange kingdoms with Emperor Charles VI, who thus had both kingdoms of Sicily, while Victor Amadeus received the kingdom of Sardinia.
So this is an example of monarchs trading kingdoms.
In 1204 the misdirected Fourth Crusade captured Constantinople, capital of the eastern Roman or "Byzantine" empire. The Crusaders selected a dark horse candidate, Count Baldwin of Flanders to be the new Emperor. Margrave Boniface I of Montferrat, the leader of the crusade, was consoled with the title of vassal King of Thessalonika. A number of rump "Byzantine" states were founded, and the three most powerful such states claimed to be the true Roman empires at various times. And two other allegedly Roman rulers got involved in the struggles for power, the Bulgarian Tsar of the Bulgarians and the Romans and the Turkish Sultan of Rum (Rome).
Thessalonika was gradually conquered by Epirus, the city being captured in 1224. Boniface's son King Demetrius died childless in 1230, and left his claim to the Kingdom to Holy Roman Emperor Frederick II in his will in 1230. Emperor Frederick granted the claim to Thessalonika to Margrave Boniface II of Montferrat, half nephew of King Demetrius, in 1239.
Constantinople was recaptured by the "Byzantines" in 1261 and Emperor Baldwin II fled. Various popes tried to arrange a new crusade to put the Latin Emperor back on the throne, and "Byzantine" Emperor Andronikos II Palaiologos tried to arrange a marriage of his heir Michael IX with Empress Catherine I, heiress of the Latin Empire, in order to avoid the danger of a crusade. He failed, but did marry as his second wife Yolanda of Montferrat in 1284, who brought her family's claim to the Kingdom of Thessalonika with her, and a son of theirs became Margrave of Montferrat when Yolanda's brother died in 1305.
Latin Emperor Baldwin II lost his capital and the lands he directly ruled in 1261, and his remaining vassals apparently didn't pay him much tribute, so he was short of money. And an attempt to reconquer his lands would be very expensive.
So in 1266 Baldwin II sold the right to the Kingdom of Thessalonika to Hugh IV, Duke of Burgundy, even though Margrave William VII of Montferrat already had the rights to the Kingdom of Thessalonika.
Then in 1274 Emperor Philip of Courtenay, son of Baldwin II, granted the rights to the Kingdom of Thessalonika to Philip of Sicily (1255/56-1277), even though Margrave William VII of Montferrat and Duke Robert II of Burgundy already had claims to the Kingdom of Thessalonika.
Philip of Sicily's claim died with him in 1277, William VII's was given to his daughter Yolanda when she married Emperor Andronikos II in 1284, And Duke Odo IV of Burgundy sold his rights to the Kingdom of Thessalonika and the Principality of Achaea to Count Louis of Cleremont, first Duke of Bourbon, in 1320.
And I suppose that it is possible that rights to the Kingdom of Thessalonika were sold to someone else at some time.
IN 1453 the Ottoman Turks conquered Constantinople and the last "Byzantine" Emperor Constantine XI was killed fighting. In 1460 the Ottomans conquered the Morea and Constantine XI's brother Despot Demetrius Palaiologos (c. 1407-1470) submitted to the Sultan. His only known child Helena entered the harem of the Sultan and died in 1469, and Demetrios became a monk before he died.
Despot Thomas Palaiologos (1409-1465), the youngest brother of Constantine XI, fled to western Europe, and was recognized as the claimant to the "Byzantine" Empire. Thomas's younger son Manuel Palaiologos (1455-1512) lived in Italy for much of his life and then traveled to Constantinople to the court of the Sultan. He sold his rights to the empire to the sultan in return for an estate and a pension. He had a son John who died young, and a son Andrew who converted to Islam.
Andreas Palaiologos (1453-1502), the older son of titular emperor Thomas, succeeded as titular emperor. He sold his rights to the "Byzantine" empire twice, to King Charles VII of France in 1494 and again to King Ferdinand and queen Isabella of Aragon and Castile.