You can use a constant velocity joint to rotate two connected bodies, such as rotating shafts, at the same rotational speed.
An example of a constant velocity joint is a double Cardan joint (consisting of two universal joints), or a Rzeppa joint.