How to make animations for two objects?
I figured it out. You just have to use armatures. What this means is:


create an armature from the create menu Shift+A.
position the bones in the Edit mode.
switch to the pose mode, shift+RMB click on each object and its corresponding bone.
press P to connect them using "bone" from the parent menu. 
finally animate the entire armature.