For telescoping gizmos like that you use Track To Constraint. So each cylinder points in the right direction as you push and pull it out. Keep in mind that Track To will point to object center of a target object. There for pay attention to where it is and how things are orientated. By using Local axis Orientation helps to see which axis needs to point. Parenting the whole thing will keep all parts together.
Sometimes you can use “Mirror” so that an object (that “really” consists of “only one half”) appears to consist of “two mirrored halves.”
You might simply find that you need to be very precise in setting your keyframes. For example, first you set them, then you go into the IPO window and click on the control-points and numerically specify their exact (x,y) position values. A bit tedious, but worth it.