To put two and two together means to make a correct inference.
1. Professor Krishna was not a genius for nothing; he was always able to put two and two together very easily.
2. On seeing the identical answers, word for word, the examiner put two and two together and realised that Karen and Mohini had cheated.