put two and two together

Intermedio alto (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."