Hi Company B Wannabe,
Before sending any email, I would do some sleuthing first.
If you have a good relationship with your current boss and feel comfortable discussing your career development/ advancement with her or him then bring it up in a career planning meeting. If not, think about what you can do to get closer to Company B, maybe volunteer to be part of the integration team. Will Company X takeover the leadership roles at Company B? You’ll want to understand what Company X intends to do with Company B first. Good Luck!