- Two bags, \(\mathbf { A }\) and \(\mathbf { B }\), each contain balls which are either red or yellow or green.
Bag A contains 4 red, 3 yellow and \(n\) green balls.
Bag \(\mathbf { B }\) contains 5 red, 3 yellow and 1 green ball.
A ball is selected at random from bag \(\mathbf { A }\) and placed into bag \(\mathbf { B }\).
A ball is then selected at random from bag \(\mathbf { B }\) and placed into bag \(\mathbf { A }\).
The probability that bag \(\mathbf { A }\) now contains an equal number of red, yellow and green balls is \(p\).
Given that \(p > 0\), find the possible values of \(n\) and \(p\).