Scenario 1: Blue cars are treated as distinguishable (B B' B"). Then the total possibility is A(5,5)
Scenario 2: Blue cars are treated as the same (B B B).
Let's take a look at a specific example:
A pattern such as (1R 2Y 3B 4B 5B) will be counted as 1 in scenario 2, but the same pattern corresponding to A(3,3) = 6 patterns in scenario 1, including, for example, (1R 2Y 3B 3B' 3B"), (1R 2Y 3B 3B" 3B'), (1R 2Y 3B' 3B 3B"), (1R 2Y 3B' 3B" 3B), (1R 2Y 3B" 3B 3B'), and (1R 2Y 3B" 3B' 3B).
The same thing happends to (1R 2B 3Y 4B 5B) or (1R 2B 3B 4Y 5B) and other patterns in scenario 2. In a nutshell, each pattern in scenario 2 corresponding to 6 patterns in scenario 1.
Therefore you need to remove the over-counting of patterns in scenariao 1 when counting in scenario 2 by performing the division as indicated.