Hexagon interview question

some logical reasoning question