Because my friend:
green = blue + yellow
yellow = red + green
if you swap the yellow in the green equation, you get:
green = blue + red + green
now, like you said, blue + red = purple, so if we swap that in the green equation, we get:
green = purple + green