BQ2002F TS pin resistor value
Look up the resistance of the NTC at 40 degrees C. In your specific case, you want Rt to be equal to this number.

More generally, you can use the voltage divider equation:

Vts = VCC * Rntc / (Rntc + RT). Re-arrange the equation to solve for variable of interest. To be thorough, you should double check that the current flowing into the BQ2002C at Ts is negligible.