Hi rangarb! Welcome to the Community!
The rules in the CODEOWNERS file work a little like CSS, in that matches further down the file (which are usually written to be more specific than matches higher up the file) take precedence.
In this case, as your rules are very specific, I would expect both team-A and team-B to be added as reviewers to a PR that alters both
Can you confirm that both teams have been explicitly given write access or above to the repository?
Also, do the teams share any members? It’s worth pointing out that when one member of a team responds, they are assigned on behalf of the whole team, cancelling the requirement for the rest of the team. If one person from team-A responded and they were also a member of team-B, they would fulfill both requirements.
Another thing to check - are you using automatic code review assignment? If so, that would de-select the team, and pick out specific individuals to do reviews instead!