Why can't we use = "ways to build first levels"? Because knowing you've built 5 levels tells you nothing about how many red blocks you've used. Two different colorings might use completely different amounts of red.
You need to track both: = "number of ways to build the first levels using exactly red blocks." Now a state like means: "I've built levels 1 through 5, and I've used exactly 10 red blocks so far (out of the red blocks available)."