This question refers to the landmark Supreme Court case, Marbury v. Madison. In this case, Chief Justice John Marshall says that, in general, the Supreme Court does have the power to issue writs of mandamus. However, he goes on to say that the Court does not have the power in this specific case because the law that gave Marbury the right to petition the Court for the mandamus is unconstitutional.
In his opinion in Marbury, Marshall a British judge who said that, if a person had a right to an office and that
person is kept out of possession, or dispossessed of such right, … this court ought to assist by mandamus.
He goes on to say that he approves of this ruling. This makes it clear that he believes that the Supreme Court does have the right to issue writs of mandamus compelling the government to do things.
However, Marshall then argues that the Supreme Court does not have the power to issue the writ of mandamus in this particular case. He says that the law passed by Congress which gives Marbury the right to ask the Supreme Court for the writ of mandamus was unconstitutional.
By making this ruling, Marshall took for the Supreme Court the power to say whether a law is constitutional. In doing so, he ruled that the Supreme Court does have the power to issue writs of mandamus but that it does not have that power in this specific case.