I've updated the answer again with hopefully clearer examples.
You're getting stuck because you're used to only 1-level resolution/replacements for pronouns, because that's what we're used to in daily speak.
But I've given a concrete 2-level example, where you will question your own stance of "that's the end of the recursive process", and help you expand the logic to 3-levels deep, 4-levels, 5... to infinity.