It is not befitting a prophet that he has captives with him unless he has subdued the enemy by shedding blood in the land. You intend to have the stuff of this world, while Allah intends the Hereafter (for you). And Allah is All-Mighty, All-Wise.
O Prophet, say to the prisoners in your hands, “If Allah knows any goodness in your hearts, He will give you something better than what has been taken from you, and will forgive you. Allah is Most-Forgiving, Very-Merciful.”
And if they intend to commit treachery against you, then, they have already committed treachery against Allah, and in turn Allah has given you full control over them. And Allah is All-Knowing, Wise.