You are definitely liable for duties and taxes in your final destination (your usual place of residence or the place you are moving to). You cannot circumvent these rules by adding transit points or a round-trip somewhere. You can also be caught weeks or months after the fact, successfully going through the border does not mean the applicable taxes are not due anymore.
When it comes to short visits and/or (airport) transits in a third country, you probably don’t have to pay customs duties and taxes but, to do everything completely by the book, you might need to complete some temporary import procedure or to provide a deposit to be refunded once you prove that you have exported the goods again. In most cases, for consumer goods and the things tourists typically carry with them, nobody bothers but such procedure do exist for really expensive things, professional equipment, cars, etc.
See also When travelling internationally with valuable personal effects, how do I avoid paying duty at each border crossing? for a related discussion and Will I get into trouble at customs if I take electronic devices for thousands of dollars into India? for a specific example.
Credit:stackoverflow.com‘