Logic game problem

Question

Hints

Answer