if the question is more general like:
if there is pixels with color black in image a,
change image b same pixels to black.
that would be like superimpose
and there it would not matter that there is a red “A” in image b.
but as more i think about that it makes less sense.
anyhow start loading the images,
read the color of image a
in a for loop over all pixels and use
https://processing.org/reference/get_.html
now post your running code here for the next step.