After this it is ye, the same people, who slay among yourselves, and banish a party of you from their homes; assist (Their enemies) against them, in guilt and rancour; and if they come to you as captives, ye ransom them, though it was not lawful for you to banish them. Then is it only a part of the Book that ye believe in, and do ye reject the rest? but what is the reward for those among you who behave like this but disgrace in this life?- and on the Day of Judgment they shall be consigned to the most grievous penalty. For Allah is not unmindful of what ye do.
According to Tafhim ul Quran,
Before the advent of the Prophet (peace be on him) the Jewish tribes who lived on the outskirts of Madina had concluded an alliance with the Arab tribes of Aws and Khazraj. When the Arab tribes fought against one another each Jewish tribe fought on the side of its allies, which led to fratricide and so to a flagrant violation of the Book of God. Moreover, when the war ended the captives were ransomed. This ransom was justified on the basis of scriptural arguments; they extolled the Word of God when it permitted the ransom of prisoners of war, but attached no significance at all to the same Word of God when it prohibited mutual feuding.
Moududi, Abu Ala. Tafhim ul Quran. https://www.englishtafsir.com/