Here is a script that gives you what you want. I am not sure it is the approach you want to take, but given your starting point, and your described ending point, I believe it is probably the most efficient way to solve the problem.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cars.jmp" );
formula_Sheet = open("C:\record_table.xlsx");
//formula_Sheet = Open( "$DOCUMENTS\discussion group\record_table.jmp" );
formula_Sheet << delete columns( {"labela", "labela_numbers", "labelb", "labelb_numbers"} );
dt << select where( dt:name( "D/P" ) == "Driver" );
dtA = dt << subset( invisible, columns( :Protection, :Doors ), selected rows( 1 ) );
dtA:Protection << set name( "LabelA" );
dtA:Doors << set name( "LabelA_numbers" );
dt << select where( dt:name( "D/P" ) == "Passenger" );
dtB = dt << subset( invisible, columns( :Protection, :Doors ), selected rows( 1 ) );
dtB:Protection << set name( "LabelB" );
dtB:Doors << set name( "LabelB_numbers" );
dtJoin1 = dtA << Join( invisible, With( dtB ), Merge Same Name Columns,By Row Number );
Close( dtA, nosave );
Close( dtB, nosave );
dtFinal = formula_sheet << join( with( dtJoin1 ), Merge Same Name Columns,By Row Number );
Close( dtJoin1, nosave );
Close( formula_sheet, nosave );
Jim