Your iCloud account has two related addresses: the Apple ID which is a non-Apple address and is the login; and the @icloud.com address which you created when you opened the account. (A minority of accounts have both addresses the same, but I'm assuming yours is not one of them.)
Are you saying that email B is the @icloud.com address and email A is the Apple ID? Though you can log in with this it uses the same password as is applicable to the Apple ID. If you have changed the Apple ID password without first signing out of iCloud you will need to sign out of that before you can sign in with the new password. To do this you may have to use the old password, though changed made a year or so back should mean the new password will work.
If you are unable to do this you will need to contact Support. Go to https://getsupport.apple.com . Click' See all products and services', then 'More', then 'iCloud', then 'Account and Setup', then 'Troubleshooting iCloud account issues'. Then click 'No thanks. Continue' to be offered contact methods.