Cogs

A and B are two interlocking cogwheels having p teeth and q teeth respectively. One tooth on B is painted red. Find the values of p and q for which the red tooth on B contacts every gap on the cogwheel A as the wheels rotate.
Exploring and noticing Working systematically Conjecturing and generalising Visualising and representing Reasoning, convincing and proving
Being curious Being resourceful Being resilient Being collaborative

A and B are two interlocking cogwheels having p teeth and q teeth respectively where $$3\leq q\leq p \leq 12$$

One tooth on B is painted red. Find the values of p and q for which this red tooth on B contacts every gap on the cogwheel A as the wheels rotate.