put two and two together

中上級 (B2) informal

Figure something out from the clues available.

"When I saw their reaction, I put two and two together and realized what had happened."