This is a somewhat obscure question and needs a supporting assumption for either answer ( 27 or 121)
Option 1: All 236 students are represented in "142 took algebra and 121 took chemistry"
=> Total = Math + Chem - Both
=> Both = 142+121-236 = 27
Option 2: NOT all 236 students are represented in "142 took algebra and 121 took chemistry" => there could be other students with Arts / Bio to make the total of 236.
=> Total = Math + Chem -Both + Other (Including other combination pairs etc;)
=> Maximum for Math and Chem together = Minimum of (Math, Chem) = 121
In such cases, it is good to think strategically and it is a bit unlikely (though possible) that the question-setter had option 2 in mind. Reason: Option 2 requires us to assume that the question does not provide complete information for the total value of 236 ( => it does not matter if it is 236 or any other greater value such as 400 or 500, this would be a little unusual for the GMAT). Hence option 1 may be a better choice: 27