The given problem can be easily understood with the help of Venn diagram drawn above.

 

Of all the students who had taken either Physics or Chemistry or both, those who had taken only chemistry will be 142-32 =110

 

Those who opted for Physics only will be 51-32=19

 

Those who opted for both  are = 32

 

Those who opted neither = 25

 

Thus total number= 110+19+32+25

                             = 186

                                                                                                ****