Hi Halkun (and welcome).
The method you are doing is the way it should be done in (native = no plugin) sketchup. One thing you need to know however is that
intersection lines will always appear in the context you are in at the moment of performing the action (i.e. in your case, outside of either component)
this also means that you can only perform a boolean intersection if the two shapes are within the same context (i.e. in your case they are not two, separate components)
Well, that was two, not one, but the solution is: after placing both components and the other geometry, explode everything, do the intersection and delete unwanted geometry.
There is also a fine "BoolTools" plugin should you need this operation very frequently and especially hate deleting unwanted stuff. It's $ 10 however - but that's only a snack at McDonalds...
It works with separate groups (and end up with one, "joint" group)