Start by putting the other person first.
I've actually had a similar problem. Sometimes it happens when I pass someone in a hallway, or walking outside, or doing something else where I'm absorbed in my own thoughts, and I find myself so startled that the person said anything that all I can say is "I'm good" before they walk away. Alternatively, I come up with a coherent response, but my mind is so frazzled by thinking about little details[1] that I finish the thought satisfied that I survived that interaction . . . and forget to reciprocate the thought.
My solution to the problem involves making sure the other person has a chance to talk before talking yourself.
Assuming that the person want's to have a more than just a short, conversation - I turn the question on them. For instance, if someone asks
Hey, HDE, how has your first week of classes been?
I'll respond
My classes have been good so far - how have yours been? I heard that the [biology/performing arts/philosophy] class you're signed up for is supposed to be really good.
I don't give myself any time to answer the question because I know that there's a risk that I'll just drone on and on and on and on and on. . . However, I normally trust the other person enough that they'll talk for only a finite time.
Once I've given the other person a chance to talk, I'll start answering their original question by making connections to what they said. If they talked about their math class, for instance, I might say
Oh, your professor sounds awesome. My calculus professor is cool, too - his sense of humor has really made my class interesting so far.
This answers part of their question (about my classes) while still staying engaged with what they said.
Don't talk for too long! Your primary objective, letting the other person talk, has been satisfied, and now it's your turn to fit in some of your own details. However, be wary of talking for too long; if you do, you're back to square one! I've made that mistake before, and I've regretted it.
Another possibility I've tried from time to time is to be the one to start the conversation. You ask the questions, and so if they want to talk, they'll have plenty of time to do so. I originally didn't include this, because I have trouble with it (I'm a pretty shy person, and not good at taking cues about when someone wants to talk), but if you're outgoing enough to want to talk for a while, it shouldn't be a problem.
That said, your specific situation seems to come up mostly when someone else initiates the conversation, so this isn't as relevant. However, a great way to, overall, become less self-centered (if you think you are - and I don't think you are) is to take an interest in others. Ask the questions - don't wait to be asked.