Question

Why in the explanation the case was split into the "same as topleft" case and the "not same as topleft" case instead of three "the bottomright vertex is red/purple/yellow" case?

@livelymockingbird0 if I'm understanding your question correctly, it's because the two options you bring up are "basically" the same:
notice that "bottomright vertex is purple" and "bottomright vertex is yellow" both fall under the case "not same as topleft." So basically, you can think of the two cases in the solution as:
"same as topleft" = "bottomright vertex is red"
"not same as topleft" = "bottomright vertex is purple" or "bottomright vertex is yellow."The reason that the solution uses 2 cases instead of 3 is that "bottomright vertex is purple" and "bottomright vertex is yellow" will give the same number of cases!! Because you can essentially think about swapping yellow and purple in every configuration. This saves a little bit of counting, because once we figure out that there are 2 colorings for "bottomright vertex is purple," we know that there are also 2 colorings for "bottomright vertex is yellow," so 2*2 = 4 total colorings for Case 2.
Hope this made sense, and let me know if it answered your question!

@audrey Thanks! Your explanation has helped.