The easiest way would be to do it with a set built for one environment/room and the door frame with the door; on the other side, where the second environment/room is supposed to be you can have a chroma screen. For example, actor walks out of living room (real set) into a desert (composited using green screen).
The next best thing is to have just the door frame in front of a chroma and replace both environments.
There may be other ways, but it depends a lot upon your script, storyboard, locations, budget, skill and so on.
For other ideas and better feedback post more details.
Ohhh thanks for the reply! But i was thinking of going from one place to another..like the character exits from a classroom and enters another place. Issit possible, without the door for AE to pan from one video (in the classroom) to another?
You'll have to be a bit more specific- find an example- a clip, image or even sketch would help. Pretty much you can do anything with the right planning, but first you need a clear idea. I suggest you draw a storyboard of how you want this scene to pan out.