The problem is that your images have different proportions. The ratio between width and height is different.
For example, if you insert a landscape image on one side and a portrait image on the other, the images will have different heights. Crop one image so that its aspect ratio is the same as that of the other. It doesn’t matter if you have to scale one image; it needs to be cropped.