No idea how to attempt it?
The force depends on two things. Look at the Coulomb force law formula to see what they are. You will find that one of them is the same for both arrangements, but the other is different. With some thought you can approximate that quantity for each situation and then the formula will tell you which results in the larger force.
Going from A to B, you have flipped the large half-sphere so its center of charge is closer to the center of the smaller half-sphere. That will increase the force. Yes, it is difficult to figure out exactly where the center of charge is, but certainly it is in the interior of the hemisphere. That alone is sufficient to prove smaller distance for B, isn't it?