Hi, odin1

I could quite easily have misunderstood your question, so bear with me if I have.

"The question that is nagging at me is this. The galaxies don't move. It is the stretching of space that moves the galaxies, so the movement is relative to space."

The movement isn't actually relative to space. The galaxies are stationary relative to space, unless acted upon by gravity of other galaxies.

"According to this article, the galaxies stay the same distance apart"

The article has misled you. The galaxies don't stay the same distance apart. The distance between them is increasing (unless they are acted upon by the gravity of other galaxies).

"If they stay the same distance apart (relative to the stretching of space) how can ones gravity capture another?"

The first galaxies are said to have formed more than 12 billion years ago. The youngest galaxy yet discovered, called I Zwicky 18, is thought to be less than 1 billion years old. As the galaxies condense at different times, there arise new gravitational sources. So, the galaxies have not been in a stable gravitational environment. It's been changing steadily over time, because of the gravitational instability. It's this gravitational instability that has caused the universe to have it's current, foamy large scale structure.