Multiple resource_groups configuration

I wanted to use multiple resource_group(s), however the official documentation doesn’t show the example of how it should be defined - groups separated by comma? or maybe some other structure?
As well as it doesn’t explain if jobs are mutually exclusive and how it relates to the concurrency of the runners. Please consider below example:

jobA:
-resource_group: theFirstRG, theSecondRG

jobB:
-resource_group: theFirstRG

jobA has two runners: runnerA (concurrency: 2), runnerB (concurrency: 2)
jobB has one runner: runnerA (concurrency: 2)

When I triggered both jobs at the same time, runnerB was completely occupied, they were started on the same runnerA. So either I defined the multiple resource_group(s) in a wrong way or in this case these jobs are not mutually exclusive at it is in case of single resource_group.
Could some please explain me how this should work and what is the correct way of defining multiple resource_group(s)?