"How do we get past the guard?" works better than "past the door." The second question is fine. Both can be used in this situation; it all depends on what we're trying to emphasize: getting in or out of the door or making our way past the guard.
I hope this helps! =)