Ques- Suppose there are two bags A and B. A contains n white balls and 2 Black balls and B contains 2 white and n black balls. One of the two bags is selected at random and two balls are drawn from it without replacement. If both the balls drawn are white and the probability that the bag A was used to draw the ball is 6/7, find the value of n.

What i tried to do is..

Let E1 and E2 be two events of choosing bag A and bag B respectively.
P(E1)= ½
P(E2)= ½
Let A be the event of drawing two white balls..
P(E1/A)= 6/7 (Given)
By using bayes’ theorem we can determine the value of n.
But sadly that doesn’t gives me the correct answer.
Kindly guide

The probability that two white balls were chosen from bag A is P = (n/(n+2))×((n-1)/(n+1)) because the first ball drawn can be any one of n out of (n+2), and the second ball can be any one of (n-1) out of (n+1).

That’s enough info to solve the problem using conditional probability: P(X|Y) = P(X∩Y)/P(Y)

(Hint: Let X = “Draw two white balls” and Y = “Choose bag A”.)