Hello!
As per my understanding, the output image needs to have some large blobs of the second image with all the other pixels from the first image.
You could segment out the large blob from the second image and superimpose it onto the first image.
Approach 1:
If all the colours on the second image are unique, then you could simply create a mask and set the pixel value of the mask to your desired colour on the first image.
Approach 2:
If all the colours on the second image are not unique, you could use watershed segmentation to obtain each region. After which, create a mask and set the pixel value of the mask to your desired colour on the first image.
Hope this helps!