When observing galaxies tens of millions of light-years away, which force determines their relative motion?
The local gravitational pull between galactic structures.
Cosmology demonstrates a strong dependence of observed motion on scale. On the largest scales, spanning hundreds of millions or billions of light-years, the driving force is the expansion of space itself, leading to significant redshifts predicted by Hubble's Law. However, when galaxies are relatively close, such as those within tens of millions of light-years, the mutual attraction generated by their mass concentration creates a local gravitational field strong enough to dominate the effect of the background expansion. In these cases, the local gravitational acceleration dictates whether the objects approach (blueshift) or recede very slowly, overriding the Hubble flow.

#Videos
If the Universe is expanding, then why do galaxies collide? - YouTube