==> configure $wgUseSharedUploads to store all images from A and B on A so that B can pull from A.
my problem is that some of the images (and the content) on B are sensitive and shouldn't be stored on a public wiki (wiki B).
any suggestions for that?
I don't think there is anything stopping you having images on B as well (which are only accessible by B). The $wgUseSharedUploads parameter just lets B use A's images in addition to its own.