Variable "i" gets its value from remapping the time value between the inpoint time of the layer and the inpoint time plus 0.5 seconds to the range of 0 to 100. Thus at inpoint the value of i is 0, from where it rises up to 100 in the following 0.5 seconds.
Variable "o" gets it's value similarly (in reverse) at the endpoint of the layer by remapping time from 0 to 100.
When you subtract o from i you get both variables affecting the opacity.
To understand the linear() function better, check it out in the AE expressions reference.