Answer:
A and B are legitimate. C and D are illegitimate
Explanation:
A. "A government that is elected by the people raises taxes." This is perfectly legal and therefore it is legitimate. Though the people may not like it.
B. "A government court sentences someone to death." If say, a murder trial goes to the Supreme Court and the judge sentences the murder to death, as long as it is a fair trial then this is legal and is legitimate.
C. "An assassin kills an elected leader." This is murder and therefore no matter the morality behind the assassination it can not be legitimate.
D: "A group of military officers takes over the government of a country." Taking over a government by force is illegal and therefore this is illegitimate
Hope this helps =)