X-rays and ultraviolet (UV) rays both belong to the electromagnetic spectrum, but X-rays have a much smaller wavelength and hence higher energy than UV rays. The energy of a photon is given by:
\[
E = h f = \frac{h c}{\lambda}
\]
where:
\( E \) is energy,
\( h \) is Planck’s constant,
\( f \) is frequency,
\( c \) is the speed of light,
\( \lambda \) is the wavelength.
Since X-rays have a smaller wavelength (\(\lambda\)) than UV rays, they carry more energy per photon. This higher energy enables them to penetrate deeper into tissues, making them more harmful to living cells.
Thus, the correct answer is (2).