Upvote:2
That's generally not a good idea. Whether it's actually a real problem depends on your specific citizenships.
Best & safest rule in my experience is
Always enter and leave a country on the same passport
Keep in mind that the round trip contains 4 border interactions, not just 2. Leave X, enter Y, leave Y, enter X.
So if you are going from X to Y you should use BOTH passports: PassX to exit X and PassY to enter Y. On the return do it the other way around use PassY to exit Y an PassX to enter X.
You can use two passports for a single flight and Airlines are perfectly capable of handling two passports when you check in.
CAVEAT: there are over 30,000 combination of X and Y and this post is only inteded to cover the "typical" rules. Many countries don't have exit controls (US) and many countries simply don't care which passport you use.