When 'who' introduces a subordinate clause, its case depends on its function in that clause (subject or object).
1. whom - object: Virgil is the candidate whom we hope to elect. (We hope to elect him).
Here, if you replace 'whom' with 'him', it sounds correct: Him we hope to elect. But not if you do it with 'he'.
2. who- subject: Virgil is the candidate who we think will win. (We think he will win).
Here, if you replace 'who' with 'he', it sounds correct: he (Bob), we think will win. But not if you do it with 'him'.
- For Teachers