The strength of gravity at the surface of a planet depends not only on its mass but also on its radius. The formula for gravitational acceleration
where:
is the gravitational constant, is the mass of the planet, is the radius of the planet.
In your case, since both planets have the same mass
If the two planets have the same mass but one planet is smaller (having a smaller radius
Conversely, the planet with the larger radius will have weaker gravity at its surface.
In summary, the planet with the smaller radius will have stronger surface gravity, even though both planets have the same mass.