Try to fix this on your Mac, as it is easier to correct the names on a Mac. The changed names will be updated by iCloud on your other devices as well. I am only assigning names on one device to avoid inconsistencies.
I had this problem first after the upgrade to macOS 10.15 Catalina and it is still happenimg occasionally. We have to be suspicious and check the named faces immediately, when Photos is surprising us during the "confirm additional faces" dialog by stating proudly "You named 15 faces and 20 faces have been named automatically". This is usually the moment, when two people get mixed up. If Photos is very sure, that two faces are showing the same person, it will not ask, if this is correct. And we have to correct it quickly, before Photos uses this wrong classification to learn, what the person is looking like.
As long as Photos has learned that person A and B are looking very similar, it will continue to merge them. To fix the problem, create temporarily two new People albums, for all photos of Person A and Person B. Give these two new people new names, very different names from the names you have used before. Use new nicknames, that are not in your Contacts. Do not rename the albums of the people - assign each person inside the album a new name, individually. To make this quickly, collect all photos from the two People albums in a separate standard album.
Then view each photo in the album enlarged, with the option "View > Show Face Names" enabled, and type the new, temporary name directly into the text field below the faces circle. Only this will remove this photo from the old album and move it to a new, different album, where Photos can learn again, what the person is looking like.
Once both albums of he two people have been cleaned up and all photos have been moved to different albums, continue to use the new nicknames for a while. The two old albums should remain completely empty.
Wait for the changes to sync to your other devices and check, if the old albums are empty on all devices. Once Photos can recognize the two people again correctly, make a current backup of your Photos Library to save this state. With a working backup you can then try to go back the correct names from the Contacts.
You may also want to check the other People albums for similar issues.
See: How to Correct Merged People Albums - Apple Community