Let's solve the following problem:
In how many different ways can the three cubes be arranged in a row?

Step 1
We find the number of possible ways to arrange the three cubes by first putting the red cube first.
There are two ways here:
- red, blue, green
- red, green, blue

Step 2
We find the number of possible ways to arrange it, this time putting the blue cube first.
Here again there are two ways:
- blue, red, green
- blue, green, red

Step 3
Lastly we put the green cube in first place.
Here again there are two ways:
- green, blue, red
- green, red, blue

Answer: 2 + 2 + 2 = 6 ways
* Combinatorics problems can be found in the course Competitive Mathematics - Level 2