Use formal wording. Select the standard sentence in which the relative pronoun is the object of invited.
Explanation
Whom is the single object of invited in the specified formal wording, so him is unnecessary. The whom we invited him version is the closest distractor because it fills the same object role twice.