This is a conditional probability problem
(1) Let R be red and P be events of being drawn from A
P(R|P)=P(P n R)/P(P)
(2) Let R be events of first ball being red , and Q be events of second ball being red
P(Q|R)=P(R n Q)/P(R)
Since the first red ball is drawn from A , the second ball (unknown colour) will be drawn from B according to the question . Now , the number of red balls increases by 1 in B , making 5R 5B and 2R 2B in A .