Well done to Hannah who sent in this generalisation:

Using the red and white blocks only, you add together the amounts of ways to form the two previous blocks:
2 ways to form the red block + 3 ways to form the light green block
= 5 ways to form the pink block

Using the red, white and light green blocks only, you add together the amounts of ways to form the three previous blocks:
2 ways to form the red block + 4 ways to form the light green block + 7 ways to form the pink block
= 13 ways to form the yellow block

It is interesting to think about why this happens.

Imagine that you are just using the white and red blocks only and that you have found that there are 2 ways to form the red block and 3 ways to form the light green block.
In order to form the pink rod you will need to either add a red block to the 2 ways you formed the red block or add a white block to the 3 ways you formed the light green block.
This will give you the 5 ways of forming the pink rod.

You can use similar reasoning to explain Hannah's other solution regarding the use of red, white and light green blocks.