How to animate two objects going apart from eachother
You need to keyframe your objects. In the timeline go to frame 0 and set your objects so as the door is shut, then select each object, press I > Location. This defines the start of the animation. To get the door to open, in the timeline set the current frame to 50 (if you want your door to open in 2 seconds) and repeat the first process excepted this time you must set the door open before adding the keyframes. Play the animation: the door opens.