Step-by-step explanation:
q = mCΔT
where q is heat,
m is mass,
C is specific heat capacity,
and ΔT is temperature change.
For the first ball:
2500 J = (100 g) C (90°C − 25°C)
C = 0.385 J/g/°C
For the second ball:
5000 J = (200 g) C (90°C − 25°C)
C = 0.385 J/g/°C
The two metals have the same specific heat, and are likely the same metal (possibly copper or zinc).