Not A because that's personification: giving objects human qualities.
Understand the definition of metaphor.
According to Webster dictionary a metaphor is :
a figure of speech in which a term or phrase is applied to something to which it is not literally applicable in order to suggest a resemblance, as in “A mighty fortress is our God.”
I agree with answer being B.