Escape of galaxies and Hubble's law