Answer explained
Direct speech of: He asked me if I knew him. is
Correct answer: (B) He said to me, "Do you know me?"
The reported "him" refers back to the speaker, so it becomes "me" in direct speech, and "knew" (simple past, from the if-clause) converts to the present "know".