The idiom "to keep one's temper" is being tested against four possible paraphrases, so checking what each phrase actually describes against the sense of staying calm and even-tempered will identify the right one.
Among the four choices, only "to be in good mood" actually describes the calm, non-angry state that "keeping one's temper" refers to.
Therefore, the correct answer is To be in good mood.