The pair simulated the collision by estimating the relative speed between the two galaxies and the amount of gas and dark matter in the intervening space, which exerts a drag on their motions.The sun should still be around in a state resembling its current one by then—it's not expected to swell up into a red giant until a few billion years later. However, the astronomers say the galactic collision could "easily kick our solar system to the farthest reaches of the galaxy." There's even a small chance we might end up relocated in Andromeda, they say.
Andromeda is currently 2.3 million light-years from our galaxy. Researchers know that the two neighbors are approaching each other at 120 kilometers per second, but they are far less certain of Andromeda's sideways speed. If moving fast enough to the side, it would miss us entirely. . . . Taking their cue from the latest models of the galaxies' structures, Cox and Loeb assumed a relatively small sideways motion. Based on this assumption, Andromeda would first graze the Milky Way two billion years from now, they report in a paper submitted to the Monthly Notices of the Royal Astronomical Society. The two galactic cores would orbit each other for another three billion years before merging.