For the first question regarding the extended metaphor in "O Captain! My Captain!", the correct answer is:
b) a ship voyage and a captain.
Whitman uses the metaphor of a ship's voyage to symbolize the journey of the nation during the Civil War, with President Lincoln represented as the captain.
For the second question concerning the shift in tone of the stanza, the correct answer is:
joy to sadness.
The stanza begins with a joyous exultation at the end of the "fearful trip," but it shifts to a somber and tragic reflection on the death of the Captain (Lincoln).