If they have largely the same content, but not 100% the same content - and you don't want one of the domains disappear from the index, you have to put some effort in it.
Before rel=canonical was introduced by Google, you had two options: Use a robots META tag and specify NOINDEX,FOLLOW on the content that was duplicate or use the content with an iFRAME as this was just a reference.
In your case I would use rel=canonical on every page that has duplicate content to point to the specific content on the other domain - but not do it domain-wide. Of course you make it obvious that way that those two domains are related and depending on your marketing this could be ok or not wanted. If you don't want people two know that (read: to make it harder to find out) I would do the NOINDEX,FOLLOW on the pages of Domain B and optimize and focus on only those contents that make it really different... aka. "brand" it.