Andromeda is a spiral galaxy much like the Milky Way. Andromeda's mass is about 2.8 ✕ 1012 times the mass of the Sun and is 2.42 ✕ 1022 m away. The mass of the Milky Way is 2.1 ✕ 1012 times the mass of the Sun.

(a) Estimate the magnitude of the gravitational force between the Milky Way and Andromeda.

(b) Assuming no other forces act on the Milky Way, find its acceleration. (Enter the magnitude only.)

find the mass of the sun. Use it to find M and m, the masses of the galaxies.

F = GMm/r^2
so plug in your numbers

a = F/m = GM/r^2