change the passive voice
1) a car has run over the dog.
The dog has been run over by a car.
The sentence is in present perfect tense so we used;
object+has+been+past participle+by+subject.
2) who has appointed him the captain??
By whom the captain has been appointed?
The sentence is in the present perfect tense in the interrogative form, so we used;
By= whom+object+has +been+past participle.