i dont see anything complicated with this apart from the misspell stuff, but you can just treat the answer with the wrong spelling as incorrect
Suppose you have 4 person as the "correct answer" then you assign a "point" for each one. For example they get 1 point for each "right name" they give, so the maximum is 4 points.
How to determine a name is "right", then? The easy way is to limit the scope: "Please write answer in the following order: First name - Last name".
Or, if you want to allow shuffle, you could do something like this:
correct = " Jane Doe"
input = " Doe Jane "
a = first word of input //Doe
b = 2nd word of input //Jane
reverse = b + " " + a
if (input != correct AND reverse != correct){
return false
}
The misspell on the other hand, should be treated as incorrect, as i said. If you want to tolerate it, you had to bring in something like a full-text search engine. But what is the point of a "Quiz" if everyone type in the wrong answer and it is treated as right?