Cogs problem

Question

Hints

Answer