Frequency-To-Voltage Convertor With LM2917
The 2nd op-amp (feeding the BJT) isn't a comparator - it's a voltage follower - whatever voltage is on the +Vin input gets seen on the emitter of the BJT - notice the negative feedback from the emitter - it's a gain of unity buffer amp.

The first op-amp is a camparator as your question states.

Page 1 of the data sheet says it all. \$V_{OUT} = F_{IN}\times R_1\times C_1\$ where \$R_1\$ and \$C_1\$ equate to your R46 and C40 on your 2nd drawing. This is the capacitor the charge pump is charging.

C42 does two things - the higher the value the lower the ripple voltage will be seen at the output however, the longer it will take to attain the correct voltage should the frequency change. Read towards the bottom of page 8 on the data sheet.