As you have now stated that both Theme A and Theme B are already Child Themes, perhaps you could try adding this to your funcions.php file in Theme B –
add_action('wp_enqueue_scripts', 'enqueue_front_scripts');
function enqueue_front_scripts(){
/** Switch to the parent blog */
switch_to_blog(1); // You may need to change the ID, I don't know what ID you main site has
/** Grab the path of the parents 'header.php' file */
$main_header_style_path = get_stylesheet_directory_uri() . '/header.css';
/** Restore the current blog */
restore_current_blog();
/** Enqueue the main header styling */
wp_enqueue_style('main-header', $main_header_style_path);
}
function get_main_header(){
/** Switch to the parent blog */
switch_to_blog(1); // You may need to change the ID, I don't know what ID you main site has
/** Grab the path of the parents 'header.php' file */
$main_header_path = get_stylesheet_directory_uri() . '/header.php';
/** Output the main header */
require_once($main_header_path);
/** Restore the current blog */
restore_current_blog(); // Don't restore until after you have included the header, otherwise you 'get_blogino()', etc. calls will reference Theme B
}
And then to include both headers you’d do this (note that the header file in both themes would simply be called header.php) –
get_main_header();
get_header();
I suggest that you have a read of the Function Reference for switch_to_blog()
for more information.
Update
I forgot to mention that you would also still need to seperate your header styling in to it’s own header.css
file in Theme A, and then enqueue this in both Theme A and Theme B.
I have update my code example about to reflect this.