use: =INDEX(QUERY(SPLIT(FLATTEN(IF(IFERROR( SPLIT(A1:A, ","))="",,SPLIT(A1:A, ",")&"?"&B1:B)), "?"), "where Col2 is not null", ))
use: