There are again multiple steps happening at once. If we simply follow the algorithm, then the b node is "pulled up" and the Compose-Node goes down one level. Once phi is only True or False case 1 (from your question) applies.
Here we can see this directly, because a does not occur in phi. Therefore case 2 will never apply. We will simply go down recursively until finally case 1 applies. Intuitively: We want to replace a. a does not occur in phi. Therefore we leave phi as it is.
This is a shortcut that is easy to see for humans, and you are allowed to do that in the exam (but better write a comment next to it). The computer can't see that since it only goes through the tree node by node and does not have an "overview".