Infinite loops circuit problem 2

Question

Hints

Answer