Combining a video and a masking video
Method 1



In your timeline, stack the matte clip on top of the character clip and add the Ultra Key effect to the matte with the red color as the key.

Nest those two clips, and place another Ultra Key effect on the nest, this time keying the black.



You'll probably have to mess with the ultra key settings a bit (transparency, choke, and soften) for both applications, but after you've got that set you should have a masked clip ready to place on a new background.



Method 2

There's also a way to do this with the Track Matte Key effect that yields slightly different results, you can decide which method works best for your matte.


In your timeline, stack the matte clip on track 3, the character clip on track 2, and your new background on track 1. 


Add the Luma Key effect to the matte.

Add the Track Matte Key effect to the character clip with the Matte set to Video 3 and Composite Using set to Matte Alpha

Adjust the Threshold in the Luma Key effect in the matte clip if the keyed content is transparent, or adjust the Cutoff if you can still see the black.





I find that the first method gives more control over how the final key looks, but Ultra Key is a complicated tool and the second method is a little more straightforward.