You look all possible teams that didn't include the particular rider and find the optimum team amongst those.
For instance the best possible team that didn't include Gerrans scored 25352 points, whereas the absolute best team (including Gerrnas) scored 26042, so his penalty is 690. In...