The correct option is
B He was given a reward by the king.
The given sentence is in the active voice, as the subject 'The king' performs an action 'gave' against the object 'a reward'.
If this sentence is changed to passive voice, then the subject is also changed, in order to retain the meaning of the sentence.
So,
the object takes the place of the subject and vice versa and the word
'by' is introduced as now the subject receives the action by the object.
The verb form of the sentence is also changed from active form to
passive.
'Subject (The king) + verb (gave) + indirect object (him) + direct object (a reward)' changes to:
'New subject (He) + verb (was given) + direct object (a reward) + by + new object (the king)'
This can be seen in option B, hence it's the right answer.
('He' is the subject form of the object pronoun 'him'.)
Option
A: The words 'he was given by the king' means that the king gave him to someone else. 'He' becomes the receiver of the action 'was given' whereas 'he', an indirect object, receives the direct object 'reward'.
Option C: Similarly, in this option, the person 'he' is receiving the action. Also, 'were' is a plural verb whereas 'he' is singular. The subject and verb must agree in terms of number.
Option D: The sentence has changed in meaning. The reward was given by the king. But here, the sentence means that 'the reward was given by him' instead.
Hence options A, C and D are incorrect.