You can absolutely publish a DKIM key for the domain and provide it to DomainB so that they can add this to DNS. You'd need to do that by adding the domain, then enabling DKIM as you would normally.
That said, messages sent via their O365 environment will lack those DKIM signatures so you'll want to make sure their DMARC policy doesn't reject or quarantine those messages.
Kyle Kerst
IT Coordinator
SmarterTools Inc.
www.smartertools.com