The consolidated retained earnings are all of Swing’s earnings (because Swing is the parent) plus 80% of Cat’s earnings (because Cat is the subsidiary).
The non-controlling interest is the 20% of Cat and it is 20% of Cat’s earnings that are therefore allocated to the non-controlling interest.