The question has already been answered, but I guess you need an explanation.
Answer:
They are buying them for him
Step-by-step explanation:
To properly understand this, you need to know about the subject-object agreement.
This agreement follows:
[S] [P] [O}
S: Subject represent who does an action
P: Predicate is what is being done
O: Object receives of the action.
In the given words, the predicate is "buying"
So, you need to know who is buying something and what is being bought
"They" -----> the subject
"are buying" ----> the predicate
"them" ---> the object
"for him" ---> to whom the object is being bought for