Creating interfaces for classes as well as placing them in a certain component is not an end in itself. It creates extra effort and boilerplate code, which needs to be justified by some purpose.
So the first question you need to ask yourself here is: which purpose do you want to achieve? For example, unit testing is a typical goal. But unit testing alone the scetched classes does only require interfaces, not necessarily in separate components. Still, isolation at the component level can make testing more simple or faster or less costly, or it enables parallel development by different persons or teams. Hence you need to decide if you want the classes CA and CB testable in full isolation from each other, so tests for CA, which may need to implement a mock for CB using the interface IB dont even have to include the component B? Or is including the component B for a test cheap and hence acceptable?
If you think you need full isolation in both directions, none of your designs seems to be sufficient - for this, one will have to introduce extra interface components, either one layer for all interfaces, or an individual interface component for each interface. But beware, such a split-up causes exteaextra maintenance effort, hence you should have a real need for it.
If in doubt, start with the most simple approach which serves your current needs (for example, everything in just one component), and refactor when you encounter requirements where separate components seem better suited.