875. Leaving the Techum Permissibly
Shabbos 27:17
What if someone left his Shabbos boundary permissibly for mitzvah purposes but, while he was traveling, he was informed that the mitzvah was already taken care of by another? In such a case, he is permitted to travel 2,000 cubits in each direction. If these 2,000 cubits overlap his original Shabbos boundary, he may return to his point of origin as if he never left. Those who leave the Shabbos boundary in order to rescue other Jews from enemies, a flood or an avalanche are permitted to travel 2,000 cubits from the place where the rescue occurs. If the enemies continue to pose a threat so that the rescuers are afraid to remain there, they may return to their points of origin, with their weapons.
Shabbos 28:1
If there is a house outside a city but within 70 2/3 cubits of the city, it is considered part of the city. Therefore , when the 2,000 cubits are measured in each direction from the city, the distance is measured from this house. (70 2/3 cubits is the length of one side of a square that is 5,000 square cubits. This measurement is based on the courtyard of the Tabernacle, which was 5,000 square cubits in area.)