Given the question: Riley removed their hat because the sun was not out anymore. Given the context: Why did Riley do this? Possible answers: become more hot, put away their hat, cool down
The answer is:
put away their hat