を兼ねて・がてら: the difference
を兼ねてN1
Meaning
And also, Also
Past papers
Example
ダイエットを兼ねて、スポーツジムに通っています。
I go to the gym, partly to lose weight.
がてらN1
Meaning
On the occasion of, While … as well, While …
Past papers
Example
「帰りがてら手紙出してくるね。」
I'll post the letter on my way home as well.
How to tell them apart
「を兼ねて」: both purposes matter and are planned on purpose, a true 'two in one'.
「がてら」: follows the stem of a movement verb or a noun (散歩がてら); the main action is what counts, and the other is a quick extra.
「ついでに」: casual 'while I'm at it'; it lacks the formal double-purpose feeling of 「を兼ねて」.