Observe the given pattern and identify what comes next?
If we observe the first figure, it is an arrangement of blue, green, yellow and red from left to right.
If we track the blue square, it goes from the leftmost, to the second, and then to the third. So, it will likely be in the fourth place.
There are two options with the blue square at the fourth place.
If we observe yellow square, it also moves towards left, from third to fourth and it moves to the first place. Hence, the second place should be the next place for yellow square.
Out of the two options which have blue in the end, only in option (b), yellow is in second place.