Hi,
Both should be declared separately. A, would be classed as foreign interest and B, as foreign dividends. They are declared separately as their rates of tax are different.
In SA106, the interest from each foreign country should be itemised, with any tax deducted in the section for interest. The dividends from each country should be itemised in the section for dividends on page F2 of SA106.
A list of country abbreviations can be found here:
Foreign notes (2022-23)
Self Assessment will add together your UK interest and foreign interest and work out the tax free amount of your Personal Savings Allowance. The same happens with dividends and the Dividends Allowance.
Thank you.