Just to make sure I understand correctly: would you need these teams not to see each other at all in Hubgets?
If this is your scenario, then I am afraid you will need to create two separate Hubgets organizations.
But if all you need is to have workgroups for each of the two departments, this is done very easily in Topics. Simply create Topics that are dedicated to each particular group/project/event, make the topics Private (so that only invited individuals can see them) and then invite the people that are supposed to see the Topic.
I have inserted below a print screen of how you can create a Topic, hope it helps: