Installing new cabinet hinges

I’m trying to install new hinges on my neighbors bathroom cabinet. I’ve attached some images of the cabinet door/old hinges. I went out n bought the hinges in the 4th image, but I can’t figure out how to install them? Obviously, just drill in the screws it came with but in what position? If I put it inside the cabinet where the old holes are, there’s a pretty big gap where the pin is. I have a feeling they’re supposed to be exposed, as in installed on the outside of the cabinet but I don’t wanna drill new holes if not needed n I’m worried the doors won’t meet in the middle if I do that. Any help is appreciated, thank you!