Didi, did you make a typographical error there, or do you really believe that both "they"s are correct?
"They" is nominative. He, she, it, they. Your second "they" is correct. "Them" is objective. Him, her, it, them. Your first "they" is wrong, it should be "them." It's the same in the Hebrew text of the sentence as well. אותן is objective ("them"); הן is nominative ("they").
I hope this helps.