Brackets all over:Condition 2

Condition 2 fails i sample input.
Please explain what does the ques mean by “combination of a and b”

After adding string a and string b, the string becomes (()), and number of opening brackets = number of closing brackets in this string.

In case
6 2
((

Possible answers are
((()))
()(())
(())()

So there are 3 possible combinations of a and b i.e
“(” and “)”
“()” and “”
“” and “()”