B. an entire poem comparing a swimmer to a dolphin.
An extended metaphor involves a comparison that is developed throughout a piece of writing, rather than just in a single line or phrase. In this case, if the entire poem is comparing a swimmer to a dolphin, it qualifies as an extended metaphor.