First of all: "You drive, therefore you use fossil fuels" is not a fallacy in and of itself.
But, in the larger context of this debate on climate change, when Mr.B offers this as a criticism of Mr.A's position on climate change, it is indeed a fallacy. That is, Mr. B is implicitly arguing: "You are saying that in order to mitigate climate change, we should limit our use of fossil fuels ... and yet here you are driving a car! So why should we listen to you? You're a hypocrite, and thus you're wrong!"
Well, that's a combination of inconsistency ad hominem and perfectionist fallacy.
It's like: "how come you're telling us to become vegetarians when you're still wearing leather shoes!"
That is, until the person is somehow perfectly living out their convictions, then somehow their convictions are mistaken ... which is a fallacy in two ways:
First, the suggestion is that one should either act perfectly on their convictions or else there is no point to their convictions at all. That's like saying: either this gun control policy erases all forms of gun violence, or there is no point to it. That's a perfectionist fallacy (a form of false dilemma), since doing something can still be better than doing nothing at all. In this particular case, it is pretty much impossible (certainly given the currently existing societal infrastructures) to live in a way that completely avoids the use of fossil fuels, but that of course does not mean that one shouldn't even try to limit one's use of fossil fuels at all.
Second, even if one would somehow be able to completely avoid the use of fossil fuels, then the fact that this person doesn't do that doesn't mean that this person's belief that limiting the use of fossil fuels as much as possible is wrong. That's the inconsistency ad hominem: the person is seen as being inconsistent and hypocritical in not practicing what they preach, but that does not mean that what they preach is wrong.
The pot calling the kettle black is not wrong in calling the kettle black just because the pot itself is black ... the pot can be perfectly correct in calling the kettle black and is fully allowed to call the kettle black.