I am not sure exactly what you mean. The same record can be in two groups. – You can create groups from groups, which can merge the two keeping the original separate groups (group A or Group B), or a group that is what is in A but not in B, and vice versa (in group A not in Group B) or shared records (in group A AND in Group B).
If you don’t have duplicates in your main library, you won’t have duplicates when you merge two groups.