Hän teki mitä hänelle oli sanottu.

English Translation

He did what they told him.

The second half of the sentence is a passive construction, and there is no ‘they’ anywhere. A better translation is ‘he did what he was told’