@Tomkitten,
This isn't rocket surgery. Although the cat is quick and agile, you are big and smart. You need to use those traits to your advantage.
First, stop opening your door when your neighbor opens her door. Really, if the biggest problem is that your cat scoots into your neighbor's apartment, the easiest solution is to make sure that both doors aren't open at the same time. If her door is open, don't open yours. If your door is open, close it as soon as your neighbor opens hers. I'm not sure why this is a constant problem for you, but the solution seems pretty obvious to me.
Second, if you don't want your cat to run out into the hallway every time you open the door, then you have to train your cat to stop running out. Despite the popular conception, cats can be trained. You just need to associate running out of the apartment with something that the cat doesn't like. For instance, next time you open the door, take a squirt gun with you and squirt the cat if it tries to make an escape. Keep doing this every time you open the door, and pretty soon the cat will be running in the opposite direction.
That's a fairly drastic remedy, as your cat will soon associate your entrance -- which should be a happy event -- with a negative reinforcement. You can mitigate that with giving the cat treats every time it stays put and doesn't make a run for freedom. But this seems to be a major issue for you, and so you need to take steps to alter your cat's behavior. Like I said before, it's easier just to alter the humans' behavior, but that appears to be some kind of insurmountable obstacle.