Scott Logic interview question

A very common logic puzzle