Consider those two verses with the two verses which follow:
"For the LORD will have mercy on Jacob, and will yet choose Israel,
and set them in their own land: and the strangers shall be joined with
them, and they shall cleave to the house of Jacob. And the people
shall take them, and bring them to their place: and the house of
Israel shall possess them in the land of the LORD for servants and
handmaids: and they shall take them captives, whose captives they
were; and they shall rule over their oppressors. And it shall come to
pass in the day that the LORD shall give thee rest from thy sorrow,
and from thy fear, and from the hard bondage wherein thou wast made to
serve. That thou shalt take up this proverb against the king of
Babylon, and say, How hath the oppressor ceased! the golden city
ceased!" (Isaiah 14:1-4)
The text brings out the fact that the captives would swap roles with their captors; with Babylon being explicitly mentioned. This is also given in the future tense, indicating its fulfillment must be future to the time in which the prophecy was given. As this is Isaiah's prophecy, it would have been given around the time of Hezekiah, king of Judah, and well before the seventy years of captivity in Babylon had begun.
The prophecy is to give hope to those who should be taken captives to Babylon that they would afterward return to their own land from the place where they had been taken as servants. Their oppressor, Babylon, would oppress them no more after this. This prophecy was fulfilled about 534 B.C., or shortly afterward, when the 70 years of captivity, prophesied by Isaiah (see Isaiah 22, especially vs. 17) and Jeremiah (see 2 Chronicles 36:21 & Jeremiah 25:11-12), had come to an end.