Use a web browser and transfer photos through albums from her iPhone to a Mac ( you can select her photos and name the album ) , similarly transfer your photos through albums and give a name to your album .
Once all photos are shared , sign out her Apple ID and password from iPhone ( but uncheck the box of photos , and keep the box of all applications as checked , as there is no need to keep a copy of photos in an iPhone , as they are already transferred to Mac .
See the article https://support.apple.com/en-in/HT208242
Then you can delete the complete photos from iCloud.com , but don't delete reset of data https://support.apple.com/en-in/guide/icloud/mm08b49040b5/icloud
The photos will be deleted from the iCloud server , she can create a new Apple ID and password and sign in with iPhone https://support.apple.com/en-in/guide/mac-help/mh35903/10.14/mac/10.14
And transfer photos from Mac to iPhone https://support.apple.com/en-in/HT201302
or a second way is share photos through albums from Mac - which is signed in with totally different Apple ID and password as used in iPhones https://support.apple.com/en-in/guide/icloud/mmc0cd7e99/icloud
The same method applies to your iPhone , you must also create a different Apple ID and password in your iPhone and transfer photos from Mac to your iPhone , both iPhones will be disconnected having their own individual photos / Apple ID accounts .