Whichever country is deemed to be your country of residence would normally credit the tax paid in the other country against tax due in your country of residence.
Teie elukohariigiks peetav riik kasseerib tavaliselt sisse seal tasumisele kuuluva maksu, võrreldes teises riigis makstud maksuga.