How to mask an image over another

i have 3 images , first and second is fixed at same position and first image is visible , now when I move 3rd image over first image , 2nd image should be visible in same size as 3rd image and other part should remain as 1st image, how can I achieve this ?
i am using cocos creator 3.4

You should use setSiblingIndex to reorder your images

setSiblingIndex will reorder whole image but i want to hide or show a part of image

Maybe you can show more with screenshots