Could you explain a bit, how these labels could be aligned?
If you have a lookup table for the corresponding indices between label_A and label_B, you could use this map to load the samples from both Datasets inside your custom Dataset.