If I were to ask the name of two people, should I say "What is the name of PersonA and PersonB?" because each person has only one name or "What are the names of PersonA or PersonB?" because I am asking for two names?
Pointing to the people and saying
would be the safest and easiest.
You have to have some way of indicating the people, after all, if you don't know their names, in order to ask for them. So one common conversational script goes like this:
This way A can imply that B mentioned the names, and pretend that they have slipped from memory, temporarily.
We say for example
if we want both names.