Hill sphere
The Hill sphere or Roche sphere of an astronomical body is the region in which it dominates the attraction of satellites. The outer shell of that region constitutes a zero-velocity surface. To be retained by a planet, a moon must have an orbit that lies within the planet's Hill sphere. That moon would, in turn, have a Hill sphere of its own. Any object within that distance would tend to become a satellite of the moon, rather than of the planet itself. One simple view of the extent of the Solar System is the Hill sphere of the Sun with respect to local stars and the galactic nucleus.