You could simply duplicate the contents of the config file for both sites and if they are on the same server that could work, although I'm not sure what side effects you might get!!
Why not do this instead:
Create a new style for site b
when people go to site b and press the forum link, it contains the style ID for site B so when they go to it they think they are still on site B!(but its site As forum really with just a different style). Make sure the header for the style for site B points all links as relevant to site Bs