(יב) אֵין פּוֹדִין אֶת הַשְּׁבוּיִים בְּיֶתֶר עַל דְּמֵיהֶן מִפְּנֵי תִּקּוּן הָעוֹלָם. שֶׁלֹּא יִהְיוּ הָאוֹיְבִים רוֹדְפִין אַחֲרֵיהֶם לִשְׁבּוֹתָם. וְאֵין מַבְרִיחִין אֶת הַשְּׁבוּיִים מִפְּנֵי תִּקּוּן הָעוֹלָם שֶׁלֹּא יִהְיוּ הָאוֹיְבִים מַכְבִּידִין עֲלֵיהֶן אֶת הָעל וּמַרְבִּים בִּשְׁמִירָתָן:
(12) They may not redeem the captives for more than their worth for the sake of civilization, so that the enemies will not pursue after them to enslave them [once they find out they are will to pay anything]. And they do not try to make the captives escape for the sake of civilization, so that the enemies will not increase the weight of their yoke and add more guards.
(ד) אין פודין השבויים יותר מכדי דמיהם מפני תיקון העולם שלא יהיו האויבים מוסרים עצמם עליהם לשבותם אבל אדם יכול לפדות את עצמו בכל מה שירצה וכן לת"ח או אפי' אינו ת"ח אלא שהוא תלמיד חריף ואפשר שיהיה אדם גדול פודים אותו בדמים מרובים (ואם אשתו כאחר דמי או לא עיין בטור אבן העזר סי' ע"ח):
(4) Captives are not to be ransomed at an unreasonable cost, for the safety of society; otherwise, the enemies would exert every effort to capture victims. But a man may ransom himself at any price. So also, a scholar should be ransomed at a greater price, or even a student who gives promise of becoming a great scholar. (As to whether one's wife is considered "another" or "one's self," see Eben Ha-Ezer, 78.)
".... indeed, the opinion of Rabbenu Nissim regarding the Talmud says that redemption may not exceed the normal value lest it be a burden on the community. However,, that would refer to the person who paid the ransom. They will become a burden on the community and fully need communal support. Thus they don't need to expend all their funds to redeem the captive. However, the community as a whole, indeed, shall redeem even at a greater cost, in order to prevent more communal damage."