Space and matter
In the standard picture, the reason that space doesn't expand on small scales is not that "it does expand, but gravitational or electromagnetic forces keeps pulling matter together again with a stronger force than the expansion can pull them apart". Rather, space and matter is tied together through gravity:
An initial and still uncertain mechanism called inflation made space expand. The matter (or rather energy at that time) followed along, but its mutual gravitational attraction counteracts the expansion. In some places, there is enough matter that expansion is counteracted completely, keeping matter in these regions from receding from each other. The relevant physical scale for this is galaxy groups.
On the other hand, in some regions there is so little matter that expansion is faster than the average. These regions are the huge voids which are virtually free of galaxies.
Resisting the Hubble flow
Anyway, back to your question: If $A$ and $B$ are $d$ Mpc apart, then the galaxies in the vicinity of $A$ will recede from the galaxies in the vicinity of $B$ with velocity $v = H_0 d$, where $H_0$ is the Hubble constant. How can we ensure that $A$ and $B$ start out with no initial velocity wrt. each other? We can either 1) put $A$ on a spaceship that flies in the direction toward $B$ with velocity $v_\mathrm{B} = v$, as measured by a "normal" observer $A'$ which is at rest wrt. some galaxy close to $A$, or 2) we can do the same with $B$, or 3) we can make both $A$ and $B$ fly, e.g. both at $v_\mathrm{A} = v_\mathrm{B} = v/2$ (where $v_\mathrm{A}$ and $v_\mathrm{B}$ are directed toward each other).
This puts an upper limit on how far $A$ and $B$ can be from each other: Since it's impossible to travel through space faster than $c$, the maximum distance is (just under) $d_\mathrm{max} = 2c/H_0 \simeq 8.8\,\mathrm{Gpc}^\dagger$.
Kinematics in an expanding coordinate system
So, what happens to a spacehip traveling through expanding space at a high velocity? We can investigate this using comoving coordinates, i.e. the coordinate system that expands along with the Universe. In this coordinate system, all galaxies lie approximately still (save for their small "peculiar" velocities; of the order a few 100 km s–1). $A$ and $B$, on the other hand, while their velocity wrt. each other vanish in physical coordinates (by construction of your experiment), they have a non-zero velocity in comoving coordinates. Nevertheless, unless they spend energy to accelerate their spaceships — and this can still only bring them up to a max velocity of (almost) $c$ — their velocity will decrease in comoving coordinates. If in the beginning the fly at (almost) $c$, and if for simplicity we assume that galaxies lie evenly distributed with one galaxy for every 1 Mpc, they will initially pass one galaxy every three million years. However, it will take more and more time to get from one galaxy to the next, since space expands.
In other words, a particle with a velocity through an expanding space will slowly lose kinetic energy, analogous to the redshifting of light.
So, the answer to your question is: If $A$ and $B$ start out sufficiently close to each other, they will eventually meet. But if they start out too far, or if they fly too slowly, they will decelerate and asymtotically go toward rest, ending up being dragged along with the Hubble flow.
$^\dagger$Ignoring minor complications like the fast heating of a spaceship traveling through the interstellar medium at a velocity (almost) the speed of light.