I think you can calculate the gross margin of each year as a weighted average of the gross margin of each of the segments, with the contribution of that segment to the total revenue as the weighing factor. So for each of the years, the overall gross margin would be contribution (bus) * gross margin (bus) + contribution (air tickets) * gross margin (air tickets) and so on, divided by the number of contributions.
To speed things up, you can use the fact that you won't need absolute value to sort them. You can therefore skip the division step, as the number of contributions is the same for each year (6) and that factor effectively cancels out. You can also remove some contributions that are sufficiently small or that are similar and therefore should cancel out - for example, air tickets contribute approximately 20% to the revenue in each of the years, and you will therefore arrive at the same order if you neglect this contribution.