The sentence if from the bible.
Then Peter said unto them, Repent, and be baptized every one of you in the name of the Lord Jesus Christ for the remission of sins, and ye shall receive the gift of the Holy Ghost.
The verb 'said' subcategorizes for two things:
[said [this] [to them]]
[said [to them] [this]] <your sentence follows this order>
Consider a shorter version
He said X to them.
He said to them X