I'm surprised this has not yet been answered. I did not see the situation to which you refer but your question is clear enough for a straightforward answer....
A free ball does NOT automatically qualify as a red ball to be followed by a nominated color. Instead, the free ball acts as a "substitute" for whatever the "ball on" happens to be in the situation at hand. By the sound of it, in your case, yellow was the "ball on" during the final color sequence, a foul was committed leaving a free ball, brown was nominated as the substitute yellow free ball, brown was potted and replaced (2 points, same as yellow), and the actual yellow (being the lowest value ball on the table) became the next "ball on".
Now for a little fun....
A commonly misunderstood somewhat similar situation would be for instance same as above except brown (as the free ball) and the yellow are BOTH potted on the same stroke (for instance, say the yellow is in the jaws and the free ball brown is played into the yellow as a plant and the brown follows the yellow into the pocket). The correct ruling is that this is a legal stroke, TWO points are scored, the brown is re-spotted, and the green is now the "ball on". It is NOT four points scored, nor is it a foul, nor is the yellow to be re-spotted.
It is a different case if the free ball is a substitute for a red....in that case, if a free ball is played as a red and it and one or more other reds drop into a pocket on the same stroke, then ALL points are scored (including the one point for the free ball). Of course, the free ball is re-spotted and the striker is now entitled to color of choice.
Doesn't happen very often, but it has.