Whoever vs. Whomever
Rule 2. When the entire whoever/whomever clause is the subject of the verb that follows the clause, look inside the clause to determine whether to use whoever or whomever.
Example: Whoever is elected will serve a four-year term.- Тот, кого выберут, будет занимать должность четыре года.
Whoever is the subject of is elected. The clause whoever is elected is the subject of will serve.
Example: Whomever you elect will serve a four-year term.- Тот, кого вы выберете, будет занимать должность четыре года.
Whomever is the object of elect. Whomever you elect is the subject of will serve.