Step 1: Understanding de Broglie wavelength.
The de Broglie wavelength \( \lambda \) of a particle is given by the equation:
\[
\lambda = \frac{h}{p}
\]
where \( h \) is Planck's constant and \( p \) is the momentum of the particle. For a particle with kinetic energy \( E \), the momentum is related to the kinetic energy by the equation:
\[
p = \sqrt{2mE}
\]
Thus, the de Broglie wavelength is inversely proportional to the square root of the mass \( m \) of the particle:
\[
\lambda \propto \frac{1}{\sqrt{m}}
\]
Step 2: Analysis of the options.
Since both the proton and the electron have the same kinetic energy, their de Broglie wavelengths will be inversely proportional to the square root of their masses. The ratio of the de Broglie wavelengths of the electron and proton is given by:
\[
\frac{\lambda_e}{\lambda_p} = \sqrt{\frac{m_p}{m_e}}
\]
Thus, the correct answer is option (B), which is \( \frac{m_e}{m_p} \).