Answer:
Your answer would be B.
Explanation:
In order to understand the difference between <em>who, whom, </em>and <em>whose </em>you first have to understand the difference between subjects, objects, and possessives.
<em>Who</em> is an subject pronoun. It is used to indicate ask which person did a certain action or which person is in certain state. On the contrary, <em>whom </em>is an object pronoun: it is used to ask which person received a certain action. Finally, <em>whose</em> is a possessive pronoun which is used to ask which person something belongs to.
Taking all this into account, it is possible to say that B is the correct answer because the question indicates that someone is receiving the action (someone visited someone else). In terms of grammar, <em>whom </em>is the correct one. However, as this version is falling into disuse save for written style, it is also okay to use the subject pronoun <em>who </em>in this case. Yet, B is the right answer in terms of grammar.