That is to scale the input so that they translate into the temperature range of interest. Since 0 represent the lowest temperature (16.0 C) and fullscale (4096)represents the maximum set value = 30.0 C, the actual range that ADC input represents is = (30.0-16.0) =14.0 degree. The formula will then take an input values between 0 and 4096 and scale it to 160 to 300.
E.g. if ADC(5) = 0, the formula translate to:
S = 0 + 160 = 160 ' represent 16.0 degree
if ADC(5) = 2048,
S = 2048*(140)/4096+160 = 230 'represent 23.0.
if ADC(5) = 4096,
S = 4096*(140)/4096+160 = 300 'represents 30.0
(Note that in real life ADC the fullscale will never be reached. The maximum reachable value is 4092 for M-series PLC).
Due to use of Integer math and not floating point math, the mulitplication has to be carried out before the division so that the computation will not be trancated.