In my point of view there are two options (if I understood correctly what you want to do). As far as I understood, the "pair" just means that you need two questions (1 from each group) and it could be ANY question from each group (e.g. A3/B6, A5/B1, etc.). If you need questions from the groups that match in some way, e.g. A1/B1, A2/B2, etc. this would be different.
First solution:
Create two questions groups for each "group". Put one question in the first group and the other 5 in the second group. Give all of these 6 questions that are distributed over these 2 question groups the same "randomization group name", then hide the second of the questions groups with the 5 questions in it.
What will happen? The 6 questions will rotate randomly among the 6 positions over the 2 questions groups. As the second question group is hidden, only one of the questions will appear randomly.
Do the same for your second group of questions.
Second solution:
You create 2 equation type questions and create a random number in each of them.
Code:
{if(is_empty(rand1),rand(1,6),rand1)}
With "rand1" being the question code of the first equation question. You then need to do the same for the other equation question let's say "rand2".
Then you will show/hide the questions within each of the groups via relevance equation, with something like this:
If you place this in the relevance equation of a question, this question will only be shown if the random number we created in the equation question "rand1" is equal to 1.
Adapt accordingly for the others.