If (BIG if) we some how figure out how to launch a mass the size of a star or planet into an orbit around two galaxies. You could then launch your starship into its orbit around the apogee, ride the mass to the next galaxy, and de-orbit burn around perigee! In this way the orbit would practically be a store of energy as well.