ついでに
Form
名詞する の + ついでに
動詞(辞書形・過去形) + ついでに
Use case
A する時、その機会を利用して B もする
A is the main action and B is the action taken while using the opportunity for A.
Examples
Sentence: 散歩のついでにこの葉書をポストに出してきて。
Sentence: 玄関の掃除をするついでに靴の整理しよう。
Sentence: インタネットで本を注文したついでに新しく出た DVD も調べた。