A relative pronoun is very often put in the sentence correctly, which means it is there to distract you. Learning the correct use of the relative pronouns is a very simple lesson, however, and once you understand it you will not make a mistake with these pronouns.
First understand what each type is.
who, he (subject)
whom, him (object)
whose, his (possessive)
which, its (possessive or connector)
The pronoun “who" is the subject pronoun. The pronoun “whom" is the object pronoun. Therefore you must determine if the modifier is performing the action in the relative clause or is receiving the action. Let's look at some examples:
1. This is the woman who got the medal.
2. This is the woman whom I saw at the prize distribution.
3. This is the man who I said got the medal.
“This is the woman" is the same in both the sentences irrespective of the relative clause, which is the dependent clause of the sentence. See if, in the relative clause “who got the medal" or “whom I saw at the prize distribution" the verb has a subject. In the first example, it doesn't: thus we must use the subject pronoun “who" In the second example, the verb “saw" has a subject performing the action, “I": thus we use the object pronoun “whom" because it is receiving the action. Now, look carefully at the third example. We can still quickly determine the dependent clause and independent clause, but there are two conjugated verbs in the dependent (relative) clause! Which one is the main action of the sentence? Not “said" but “got" is the main action, and so again we are using the subject pronoun “who" Let's look at some more difficult examples.
4. The woman who lived next door for fifteen years is studying to become a doctor.
5. The woman whom I lived with for fifteen years is studying to become a doctor.
Above, the relative clause is in the middle of the sentence. Notice we can take it out and the basic sentence still makes sense: “The woman...is studying to become a doctor." In the first example it is the “woman" performing the action: use the subject pronoun “who" In the second example, the subject “I" is performing the action and the “woman" is receiving the action: use the object pronoun “whom"