For both the impairment of the subsidiary goodwill and the associate, then you account for the entire figure given in the question. You do not need to take any percentage of the figure.
To process the impairment in goodwill you reduce the goodwill and then if it is measured under the fair value method it is split between the parent and NCI in their respective share. If it is held under the proportionate share then it goes entirely to the parent.
Any impairment of the associate reduces the investment in associate and the share of profit or associate too.