iOS Swift Collections and Control Flow Control Flow With Loops For In Loops

cannot get the second task of the exercise correct. Please help

Trying to do the second part of this task but i cannot figure it out. Please help.