869. When One's Techum Ends in a Private Domain
Shabbos 27:5
If a person walks the 2,000 cubits of his Shabbos limit and he finds that his boundary falls in a barn, a corral, a cave or a city, he is only permitted to walk to that boundary. Just because his boundary falls within a private domain, that does not entitle him to walk throughout that domain. This is the case when one's boundary falls in the middle of the city or the cave. If the entirety of that private domain falls within his 2,000-cubits limit, then the entire domain is considered as if it were only four cubits and the balance of his 2,000 cubits is calculated based on that.
Shabbos 27:6
Therefore, If there were 1,000 cubits from the place that a person made his base for Shabbos, or from the town where he spent Shabbos, until a city or cave that is a 1,000 cubits or fewer in length, that person may walk the entirety of the city or cave and then beyond it for another 996 cubits.