Final answer:
Congress can legally compel someone to appear and testify under oath through a subpoena, not through impeachment, executive order, or writ of habeas corpus. The correct option is B.
Step-by-step explanation:
Congress can legally compel someone to appear before it to answer questions under oath by using a subpoena. This is a legal document that orders an individual to testify before a court or in this case, before Congress.
A writ of habeas corpus, on the other hand, is a legal instrument that ensures a person's release from unlawful detention. It is not used to compel testimony.
Impeachment is a formal process where an official is accused of unlawful activity, potentially leading to their removal from office, whereas an executive order is a directive issued by the president which manages operations of federal government.
Hence, Option B is correct.