Hi William KD,
If you are declaring a foreign capital gain, you need to declare this in the capital gains section, to bring the gain into the calculation and also in the foreign section where you declare the foreign tax paid. You can also declare a foreign tax credit to set against the gain in the calculation.
Thank you.