If you are doing something and you do something else in the process, you do the second thing as part of doing the first thing.
He finished ahead of the Spaniard, and in the process picked up his first time trial win as a pro.
You have to let us struggle for ourselves, even if we must die in the process.