he took a number larger than the largest number he got, which was at about 2", and subtracting it from the values he recieved from the sensor. He does this because if you were to look at a graph of the unaltered output from the sensor you would see the curve is inverted; closer to minimum accurate sensing distance will be a larger number, everything else after that falls off. Now, if you subtract the sensor response from the largest value you can get, you will have a ‘pretty’ sensibly oriented graph that you can understand. The larger the number, the farther away the object is from the sensor.
You might be able to pick up on what I just said if you look at the greyed-out numbers in his graph. At 2" the sensor reports between 161 and 164. At 15" the sensor reports 15. If you subtract 165 from 15 you will get 150. Bigger number, farther away. If you subtract 161 from 165, you will get 4. Smaller number means the object is closer.
His intent is to make the sensor output follow a normalized logic. All you would need to do to follow his example is to find the nearest distance your sensor will measure and use a number larger than that to invert the numbers that your sensor outputs. You will not have a one to one correlation of output and distance, but, at least when you get a higher number back after your subtraction you will know the object is farther away. If you make a graph like he did, you could add a look-up table to your bot that would let it keep a certain distance from objects and avoid objects at a different distance, or, any number of other ideas.