The correct answer is “them”.
“Them” is the object of the verb “heard”. The sentence is about someone who heard something about someone else going to Agra. The object of the verb is the person who is being talked about, and in this case, that person is “them”.
“Theirs” is a possessive pronoun, and it cannot be used as the object of a verb. “They” is a subject pronoun, and it cannot be used as the object of a verb. “Their” is a possessive pronoun, and it cannot be used as the object of a verb.
Here is a diagram that shows the grammatical structure of the sentence:
[Subject] [Verb] [Object]
[I] [heard] [them] [going to Agra]
The subject of the sentence is “I”, the verb is “heard”, and the object is “them”.
I hope this explanation is helpful. Please let me know if you have any other questions.