E5: Who vs. Whom: Use who or whoever when the pronoun performs the action indicated by the verb (is the subject of the clause). Use whom or whomever when the pronoun is the object of a verb or the object of a preposition. See Writing for Success Section 2.5 p. 83 or the following: https://web.ku.edu/~edit/whom.html
Who ate the last piece of cake? – (subject) the “who” did the eating.
She gave the last piece to whom? – (object) the “whom” was acted upon by “she.”
I don’t know whom gave that gift to him (Incorrect)
I don’t know who gave that gift to him. (Correct) – The who did the giving
That was the chef who Jane was raving about last night. (Incorrect)
That was the chef whom Jane was raving about last night (Correct) – The whom was the object of Jane’s raving.
Nineteen students passed, four of who recovered from failing grades. (Incorrect)
Nineteen students passed, four of whom recovered from failing grades. (Correct) – Here the “whom” is the object of the preposition “of.”