Let E1 event denotes the selection for 1st bag
and E2 event denotes the selection for 2nd bag
Given P(E1)=21,P(E2)=21
Let the event A= selected balls are 1 red & 1 black
P(E1A)=C26C13×C11=51
P(E2A)=(n+5)C2C13×C12=(n+5)(n+4)12
P(AE1)=P(E1)×P(E1A)+P(E2)×P(E2A)P(E1)×P(E1A)
⇒21×51+(n+5)(n+4)621×51=116
⇒n=4