How can I prevent photos from people I don't share with from appearing when shared with people I do share with?

How can I prevent photos from people I don't share with from appearing when shared with people I do share with?

I invited a friend to share my icloud photos but when she accepted the photos she had from another friend all went into my photos so now we both have a folder of photos that are mixed, how do I change this? Should I uninvite her? I am worried if I delete her photos from my folder they will also be deleted from her icloud.
Re: icloud photo sharing

iCloud - Photos - Apple Support

Original thread: https://forums.imore.com/threads/how-can-i-prevent-photos-from-people-i-dont-share-with-from-appearing-when-shared-with-people-i-do-share-with.313946/