  In this paper we consider dynamical behavior of astrophysical objects
(galaxies and dwarf galaxies) taking into account both gravitational attraction
between them and cosmological expansion of the Universe. First, we obtain the
general system of equations and apply them to some abstract systems of
galaxies. Then we investigate the collision between the Milky Way and Andromeda
in future. We distinguish two models. For the first one, we do not take into
account the influence of Intra-Group Matter (IGrM). In this case we demonstrate
that for currently known parameters of this system the collision is hardly
plausible because of the angular momentum. These galaxies will approach the
minimum distance of about 290 Kpc in 4.44 Gyr from present and then begin to
run away irreversibly from each other. For the second model, we take into
account dynamical friction due to IGrM. We find a characteristic value of the
IGrM particle velocity dispersion $\tilde\sigma=2.306$. For
$\tilde\sigma\leq2.306$ the merger will take place, but for the bigger values
of $\tilde\sigma$ the merger can be problematic. If the temperature of the IGrM
particles is $10^5$ K, this characteristic value of $\tilde\sigma$ corresponds
to the IGrM particle mass 17 MeV. Therefore, for the IGrM particles with masses
less than 17 MeV the merger becomes problematic. We also define the region in
the vicinity of our Local Group where the formation of Hubble flows starts. For
such processes the zero-acceleration surface (where gravitational attraction is
balanced by cosmological accelerated expansion) plays the crucial role. We show
that such surface is absent for the Local Group. Instead, we find two points
and one circle with zero acceleration. Nevertheless, there is a nearly closed
area around the MW and M31 where the absolute value of the acceleration is
approximately equal to zero. Hubble flows are formed outside of this area.
