Arm interview question

Logical puzzle. Took a while to solve