The Shulchan Aruch · Orach Chayim
אורח חיים ת״זOrach Chayim 407
Siman 407 of 697 in Orach Chayim — 3 se'ifim
הלכות תחומיןLaws of Techumin· siman 407
Se’if 1א׳
מִי שֶׁיָּצָא חוּץ לַתְּחוּם בִּרְשׁוּת, כְּגוֹן חֲכָמָה הַבָּאָה לְיַלֵּד וְכַיּוֹצֵא בָּזֶה, יֵשׁ לָהּ אַלְפַּיִם אַמָּה לְכָל רוּחַ בְּאוֹתוֹ מָקוֹם שֶׁהִגִּיעַ לוֹ; וְאִם הִגִּיעַ לָעִיר, הֲרֵי הוּא כְּאַנְשֵׁי הָעִיר וְיֵשׁ לוֹ אַלְפַּיִם לְכָל רוּחַ חוּץ לָעִיר עַיֵּן לְעֵיל סוֹף סי' רמ"ח.
One who went out of the Shabbat barrier with permission, for example a midwife brought a child or things like that, she has two thousand amot in each direction from that spot that he arrived at; and if he arrived to a city, then he is like the people of the city and he has two thousand [amot] in each direction outside the city (look at the end of Siman 248.)
Se’if 2ב׳
הָיָה יוֹצֵא בִּרְשׁוּת וְהוּא הוֹלֵךְ בַּדֶּרֶךְ, וְאָמְרוּ לוֹ: כְּבָר נַעֲשֵׂית הַמִּצְוָה שֶׁיָּצָאתָ לַעֲשׂוֹת, יֵשׁ לוֹ מִמְּקוֹמוֹ. אַלְפַּיִם אַמָּה לְכָל רוּחַ; וְאִם הָיָה מִקְצָת הַתְּחוּם שֶׁיָּצָא מִמֶּנּוּ בִּרְשׁוּת מֻבְלָע בְּתוֹךְ אַלְפַּיִם אַמָּה שֶׁיֵּשׁ לוֹ מִמְּקוֹמוֹ, הֲרֵי זֶה חוֹזֵר לִמְקוֹמוֹ וּכְאִלּוּ לֹא יָצָא.
If he goes out with permission and walks on the path, and they said to him: the mitzvah is already made when you went out to do [it], he has from his place two thousand amot in each direction; if he has a little of the barrier that he went out from with permission, it is absorbed within the two thousand amot that he has from his place, when he returns to his place it is like he didn't go out.
Se’if 3ג׳
כָּל הַיּוֹצְאִים לְהַצִּיל נְפָשׁוֹת מִיַּד עוֹבְדֵי כּוֹכָבִים, אוֹ מִן הַנָּהָר אוֹ מִן הַמַּפֹּלֶת, יֵשׁ לָהֶם אַלְפַּיִם אַמָּה לְכָל רוּחַ מִמָּקוֹם שֶׁהִצִּילוּ בּוֹ; וְאִם הָיְתָה יַד עַכּוּ"ם תַּקִּיפָה, וְהָיוּ מְפַחֲדִים לִשְׁבֹּת בַּמָּקוֹם שֶׁהִצִּילוּ, הֲרֵי אֵלּוּ חוֹזְרִים בְּשַׁבָּת לִמְקוֹמָם וּבִכְלֵי זֵינָם.
All those who venture forth to rescue from the hands of non-Jews, or from the river, or from the rubble – have two thousand cubits in each direction from the place of rescue; and if the hand of the non-Jews was powerful, and [the rescuers] were afraid to remain in the place of rescue, they may return on Shabbat to their own location, with their weapons.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0