Your light fixture is wired hot. One of the three wires to the first switch is that hot power, the other two are choices "A" and "B" going to the 2nd switch. Either A or B will always have power and the other will not, depending on the switch position.
The 2nd switch picks one of the incoming wires, then sends the result back to the light on its third wire. Flipping the 2nd switch always results in the opposite effect, giving power when there was none, or taking it away if it was there.
You can make this timer switch work with the wiring you have, but you will have to drop the 2nd switch in the menage a trois and reassign a wire to neutral. Alternatively if you have any outlets nearby you can tap into their neutral and snake a single conductor on up.
Are the boxes metal or plastic? If plastic you should get a ground too.