This is a conditional probability question.
Let A be the event that the 2nd bag was chosen
Let B be the event that a white and a red ball were picked out
You're looking for the probability of A given B, the formula is:
P(AnB) is the probability that the second bag was chosen and then a white and a red ball were picked out of it. These are independent events, so you multiply the probabilites.
The probability of picking the 2nd bag is 1/3, since it was chosen at random from 3 bags.
Then the probability of picking a white and a red ball is a little more complicated - you have to pick either a red then a white, or a white then a red. In the first case, the probability of getting a red ball first is 3/6 = 1/2. Then the probability of getting a white after that is 2/5 (only 5 balls in the bag now). Multiply to get 1/5. Then for the second case, the probabilities are 2/6 = 1/3 and 3/5, multiply to get 1/5 also. Either of these scenarios gives you one white and one red. Add the probabilities - 2/5.
Then P(AnB) = 1/3 x 2/5 = 2/15
If you're confised try drawing this out on a tree diagram, it's much more intuitive to follow than a verbal explanation.
Finding P(B) is similar to this last part. In total you have 6 balls of each colour - 18 balls. You need a white then a red or a red then a white.
P(B) = 6/18 x 6/17 + 6/18 + 6/17 = 72/306
plug those into the formula to get P(A|B)= 153/270 = 0.566666 (recurring)
I should stress that I think this would be way easier to follow using a tree diagram