Now that the camera is always looking at the object we can change its position without worrying about its rotation. Let’s add a few locations keyframes. Move the Cursor in the Timeline to the point in the animation you’d like the camera finish moving. Since Blender interpolates movement we’ll first position the camera where we’d like it to end up, and then adjust when it starts moving if needed.
Again, if you want your animation to loop make sure the camera is in the same position in the first and last frame. Position your camera where you’d like it to be at the start and end of the animation. In the Timeline, move the Cursor to the first frame, press I and select Location. Now move the Cursor in the Timeline to the last frame and add another Location keyframe. Now no matter what you keyframes add in between, the animation should loop correctly.