Let me explain a bit the theory behind compression.
A losless compression
A non compressed bitmap image will look like this.
Pixel 1,1 is white
Pixel 2,1 is white
Pixel 3,1 is white
Pixel 4,1 is white
Pixel 5,1 is red
Pixel 6,1 is red
A compressed one will look like this
Pixel 1,1 to 4,1 are white
Pixel 5,1 to 6,1 are red
This means that the amount of compression depends on the content of the image, how many pixels of the same color are next to each other.
That image will compress at a diferent ratio than other
Pixel 1,1 is white
Pixel 1,1 is red
Pixel 3,1 is white
Pixel 4,1 is white
Pixel 5,1 is red
Pixel 6,1 is white
Lossy compression
The lossy compression makes something simmilar but takes a diferent aproach.
On a photo we can have simmilar colors, not identical. Then the algorithm says: "Oh this color looks simmilar to that one, let us think that it is the same.
But that one it is too diferent, lets not consider that one"
That is defined by the level of compression, and that is why it looses information.
Your case
(same dimensions, the image is also kinda similar in terms of color)
It would probably be a matter of seeing your images in detail, but lets think one case.
You have a pure green circle on one file and you have the same size green circle but with a small pattern on it. This will totally be a diferent size, becouse in a bitmap there is no way of describing a "general pattern on the circle" it must be done pixel by pixel.
There is a chance you actually increased the file size by doing a 2 step process, for example, when you use a gif or PNG 8 bit compression you could add a pattern. This is becouse probably on your pallete you have a green that could look better using a small pattern of a lighter green. In thoose cases you should use non pattern or dither.
The conclusion
It is a matter of analizying what method and lvl of compression each image needs.
The program that the other users are recomending try some settings on the image and discard others.