Attraction between 2 rigid bodies
Forces only have an effect on rigid bodies on the same Layer - so use separate layers for each set of independent objects and forces.

Essentially you need to do the following :

On one layer, create objects A and B. Create a 'Force' force field at the origin of object A (select object A, press Shift-S and select 'Cursor to Selected', then Add/Force Field/Force) and parent it to object A. Create a 'Force' force field at the origin of object B and parent it to object B. Set each of the force fields to a negative strength (eg, -50). You should now find that A and B are drawn towards each other.

Swap to the next layer and repeat for C and D.

Running the animation (with both layers selected) should now result in two pairs of objects attracted to each other but not the other pair.