In which sentence is whom used correctly?

AWhom has the skills to write the essay?
BI think he is whom is speaking.
CI want to know whom wrote the essay.
DHe is whom you want to speak to.

Verified Answer :

(D) He is whom you want to speak to.

The answer is D: He is whom you want to speak to.

Whom is a pronoun used when referring to the object of a verb or preposition. Who, on the other hand, is used when referring to the subject of a sentence. The rule of thumb to remember is that, if you can replace whom with him or her, then you should use whom; and, if you can replace who with he or her, then you should use who. In the answer above, if the sentence is restated in a simpler way, you could say: you want to speak to him.