In sentence 3i it's "Latin"; in sentence 7 it's "hat," while in sentence 8 it's the word "ball." If the object is a pronoun capable of exhibiting case distinction, the case should be objective. Thus,
20a I hit him
which is easy, and
20b Whom did I hit,
which is less easy, because our word-order instincts urge us to put "who" at the beginning of a sentence whether it's the subject or not.
Sometimes a verb will also take an indirect object, which can be replaced by "to" and a prepositional phrase. Once again the objective case of the appropriate pronoun will be in order. Thus
21a I gave her the ball
21b I gave the ball to her
21c Whom did you give the ball?
21d Whom did you give the ball to? (See sentence 9 above.)
21e To whom did you give the ball?
(You have probably heard that you shouldn't end a sentence with a preposition, as in 21d, but this is a stylistic question not a grammatical one. If you choose the more elegant approach of 21e, be sure you don't drift off and write
21f 7 To whom did you give the ball to?
There is a lyric by Paul McCartney that reads "This ever-changing world in which we live in.")