Hi!
In that case, I would suggest creating 2 different badges: one for people completing the courses A&B and another for people from the Department 1 (you can use a cohort for that) who has completed the course A.
Apart from that, you can create an issue for adding the improvements you've identified to the badges
Cheers,
Sara