How do I create a negative border around images that are overlayed on top of other images?

Hi all! I am trying to figure out how to subtract the stroke from around images that are positioned on top of other images, in order to create a transparent outline. Here is an example.

I know how to do it when punching out an image ontop of another image to create a see-through shape inside of that image, but I cannot figure out how to do it with the stroke.

Thank you in advance for any help!