when would the tail of a comet appear to become longer?

a as it gets farther from Earth
b as it gets closer to the sun
c as it gets closer to earth
d as it gets farther from the sun

b as it gets closer to the sun