I think I answered this question in another thread on this board. (It may have been a differen forum.) Briefly, Newton's law of gravity requires that any two non-zero masses a finite distance apart (in an otherwise empty universe)- must accelerate toward one another. If their relative velocity is only radial [edit: and less than escape velocity], they must eventually crash into one another, even if they begin moving apart. If they start with some non-radial velocity, they must orbit one another (it may be a very long thin elliptical orbit).

However, Newton wrote his law of gravity for non-expanding space. Since space is expanding, the two objects begin with a certain radial acceleration away from one another in addition to the acceleration of gravity. As they move farther apart, the acceleration caused by expanding space increases and the acceleration of gravity decreases. If the velocity is zero and the acceleration due to expansion is greater than that due to gravity, they will never get any closer together. For non-zero initial velocity, the formula is a bit more complicated. (To satisfy the purists, when I say "velocity" and "acceleration", I'm talking about the time deriviatives of distance. Cosmologists use comoving coordinates system, in which the time derivatives of distance are considered to be only "apparent" velocity and acceleration.)

The rate of expansion is Hubble's constant. Hₒ ≈ 2.5 x 10^-18/s. The Hubble velocity at r is Hₒr, and the Hubble acceleration at r is ½Hₒ²r.

Comoving coordinates expand with space, so space doesn't expand relative to the coordinates. There is another way to look at the universe, besides comoving coordinates. If the coordinate system does not expand, then the expansion of space is equivalent to a parabolic gravity hill centered on the origin. (At billions of light years, the shape is not parabolic because of relativistic effects.) The acceleration of gravity between two objects is like a depression in the top of that gravity hill. The two objects can roll up the sides of the depression; if they roll over the rim, they will keep on going.