This is a very common mistake, and it gets back to simple grammar. Use “who” in the subject of a sentence, “whom” in the object of a sentence. Not sure what’s the subject and what’s the object? Google it.
An easy way to figure it out is to substitute the following for “who” and “whom” and determine which is correct. For example:
Who/whom pulled a gun out of a holster?
He pulled a gun out…
So “Who” is correct.
Who/whom did he want to shoot?
He wanted to shoot “her.”
So “whom” is correct.
This works perfectly for those sentences with adjective clauses, like these:
The man who came to the house poisoned her cake.
He (the man)
So “who” is correct.
I’d like to know who he gave the poison to.
To Who/whom was the poison given?
So “whom” is correct.*
*Actually the correct version of the sentence should read:
“I’d like to know to whom the poison was given.”
There is an exception to this. If the sentence is in dialogue, you can use “who” and leave the word “to” at the end of the sentence. Why? Because most people don’t speak using perfect grammar. But if it’s in narrative, you need to do it right.
(See Writing Lite Tip #9.)