To clarify, I'm not talking about the users who try to logon, but the user you used to add the domain to SSO, which needs at least read access to the AD on Domain B. Although I can't tell you for sure what the error message you mentioned means, error 5 usually points to "access denied".
André