How to duplicate composition and subcompositions?
Make all your duplications in the Project Panel, not in the Layer/Timeline panels.

Duplicate Comp A

Duplicate Comp B

Double click Comp A2 to open it in the timeline.  It will still contain Comp B. We need to fix this.

Make sure Comp A2 is still open and visible in the timeline

Select Comp B 2 in the Project Panel

Select the Comp B layer in your Comp A 2 timeline

Hold down the option key on a mac (alt on a PC)

Drag Comp B 2 from your Project Panel over the top of Comp B in your timeline panel.

Let go of the dragging. 

Comp B in your timeline panel should now be replaced with Comp B 2.

This is a bit of a faff, but gets easier after you've done it a few times.