Differential gears located between crankshafts and camshafts for varying the timing of valves