I have a box containing 3 bags. Each bags contains three marbles. Bag A contains two yellow marbles and one red; Bag B contains two reds and one blue; Bag C contains two blues and one yellow.
I randomly select a bag (1/3 chance of each bag being selected) and randomly select a marble from the bag. I show you the marble, it is red. I set that marble aside and pull another marble from the same bag. What is the probability of it being red?
Without knowing the colour of the first marble, the probability of the second marble being red, yellow and blue are all equal. $P(2:R) = P(2:Y) = P(2:B) = 1/3$
A simple bit of calculation shows that, given the first marble was red, there is a 1/3 chance I had selected Bag A, in which case there is a 0 chance of the second marble also being red. There is a 2/3 chance that I had selected bag B, in which case there is a 1/2 chance that the second marble will be red. So, conditional on the first marble being red, there is a 1/3 chance of the second marble being red. Incidentally, there is also a 1/3 chance of it being yellow and a 1/3 chance of it being blue.
That is, the information of the first marble's colour is actually $irrelevant$ to calculating the probability of the second marble's colour!
This situation arose in the case of the triad (0,1,2); that is, each bag containing '0' of one colour of marble, '1' of another colour and '2' of the third colour. Other triads where the colour of the first marble is irrelevant include (1,2,4); (2,4,6); (4,6,9) and so on. In general, a triad $(a,b,c)$ has the colour of the first marble irrelevant iff:
$ [\frac{a}{a+b+c} $ x $ \frac{a-1}{a+b+c-1}] $ + $ [\frac{b}{a+b+c} $ x $ \frac{b-1}{a+b+c-1}] $ + $ [\frac{c}{a+b+c} $ x $ \frac{c-1}{a+b+c-1}] = \frac{1}{3} $
This expression simplifies to:
$ a^2 + b^2 + c^2 = ab + ac + bc + a + b + c $
Using this diophantine equation, infinite triads can be generated.
The question is, how to generalise this concept of irrelevancy of a piece of information to calculate a probability. Suppose there were 4 bags - what are the quadruplets which work? What about a general $n$ bags Is it possible to create a situation in which the colour of the 1st marble is irrelevant to the 2nd marble AND the colour of the 2nd marble from the bag is irrelevant to the 3rd marble?
True, but only because of the peculiar distribution of the marbles in the bags, for the specific question posed by the OP (i.e. original poster).
As the analysis in the posted question indicates, since the marble is seen to be red, you have the intermediate result that the probability of the bag involved is bag A, bag B, or bag C is $(1/3), (2/3), (0)$ respectively.
The distribution of marbles within the $(3)$ bags were carefully constructed, so that this leads to the probability of the next marble chosen from the same bag (as the first marble) being blue, yellow, or red is $(1/3), (1/3), (1/3)$ respectively.
Obviously, this matches (for example) the probability of the 2nd marble being drawn from a bag being red, where no info is available re the color of the first marble being drawn.
So, you have accurately diagnosed an anomaly that was carefully (and somewhat artificially) constructed by the distribution of the marbles in the $3$ bags.
Edit
Another way of saying the same thing is that when the first marble is red, the increased probability that the bag it came from is bag B is exactly offset by the fact that if bag B is involved, there is now $(1)$ less red marble in bag B.
Edit
A $3$rd alternative exposition is that :
Prior to drawing the first marble, the problem is completely symmetric with respect to the red, blue, and yellow marbles.
Prior to drawing the first marble, the probability of drawing two marbles from a bag (without replacement), and having both marbles being the same color is $(1/3)$. This holds, regardless of which of bags A, B, or C is involved. It also holds regardless of whether the first marble drawn is red, blue, or yellow.
Addendum
Responding to the comment-question of Thomas Delaney.
One plausible approach:
Assume that
There are $n$ bags.
Each bag contains $n$ marbles.
There are a total of $n$ different colors that the marbles come in.
For each color, there are a total of $n$ marbles, in all of the bags combined.
For each color there is exactly 1 bag that has $k$ marbles of that color, where $k < n$.
For each color, besides the bag containing $k$ marbles, there is no more than $1$ marble of that color in any of the other bags.
Then, the probability of drawing two marbles (without replacement) of the same color from the same bag will be independent of the bag involved and independent of the color involved.
That is, the probability will be
$$\frac{\binom{k}{2}}{\binom{n}{2}} = \frac{k(k-1)}{n(n-1)}.\tag1 $$
You want the expression in (1) above to equal $\displaystyle \frac{1}{n}$.
This is done by choosing $k,n$ such that $k \times (k-1) = (n-1).$
Formally:
if you are given that the 1st marble is red, the chance of the 2nd marble being red will be
$$\frac{k}{n} \times \frac{k-1}{n-1} = \frac{1}{n}.\tag2 $$
In (2) above, the first factor is the probability that the pertinent bag is the one with $k$ red marbles. The 2nd factor reflects that there are now $(k-1)$ red marbles remaining in this bag and a total of $(n-1)$ marbles remaining in this bag.
Since no other bag starts out with more than $1$ red marble, (2) above represents the final computation.
Continuing the formal demonstration, before any marble is chosen, the chance that the 2nd marble drawn from a bag will be red is the same as the chance that the first marble drawn from a bag will be red. This probability is
$$\left[\frac{n-k}{n} \times \frac{1}{n}\right] + \left[\frac{1}{n} \times \frac{k}{n}\right] = \frac{1}{n}. \tag3 $$
In the LHS of (3) above, in the 1st term, the 1st factor reflects the probability that the bag selected is one of the $(n-k)$ bags that contain $(1)$ red marble. In the LHS of (3) above, in the 2nd term, the 2nd factor reflects that in one of the other bags, there are $(k)$ red marbles.