How to determine which of two metals will have the higher temperature after applying the same amount of thermal energy?
By definition, the heat capacity is the energy required for a body to be warmed by $\pu{1 K}$. For the specific heat capacity it's the same but normalized by the mass. The higher the heat capacity is, the more energy will be required to warm it. 

The metal $\mathrm{X}$ having the lowest heat capacity will have the higher temperature if it receives the same amount of energy than the metal $\mathrm{Z}$.