Let's say I have a black and white video, of a man walking, for example.
I want to replace the white parts of the video with a second video, and the black parts with a third video. In effect I'm using the first black and white video as the key for mixing the other two.
You can get close to it in res using ad/li and da/mu
Can't remember exactly but I think your vids need to be quite contrasting to each other but with a minimal tonal range in themselves. Darken with the lighter clip and lighten with the darker clip (get it?). The darker clip shouldn't lighten the lighter clip too much and vice-versa.
It's not perfect and the heirarchy of the layers matters too but I can't remember just now and I'm not at home to test. I do remember I got best results with complimentary opposite colours ie deep blue and bright orange clips.
You can make clips in AE first with chromakey and making your black and white clip blue and green, replacing each colour with the desired clip, but it's not the same as live obviously.