Upvote:0
At Canadian check-in you Show both passports.
Canadian immigration? There's no Immigration control when leaving Canada, period.
For entering Country A, you obviously use that country's passport.
On the way back, again, at check-in you Show both passports, while at Immigration, you Show the passport of Country A. For Canadian Immigration, the Canadian passport.