Think like a detective figuring out a mystery using hints. With the door unlocked and the lights on, she put two and two together that someone was inside.
Pro Tip 2/3
No Direct Proof
Use the phrase when you're making a guess based on indirect evidence. He didn't tell me he got the job, but seeing his new suit, I put two and two together.
Pro Tip 3/3
Informal Contexts
The phrase is casual, so it's not usually used in formal writing. When they giggled every time he passed by, we put two and two together.