In recent years, elastic electron-proton scattering experiments, with and without polarized protons, gave strikingly different results for the electric over magnetic proton form factor ratio. A mysterious discrepancy ("the proton radius puzzle") has been observed in the measurement of the proton charge radius in muon spectroscopy experiments versus electron spectroscopy and electron scattering. Two-photon exchange (TPE) contributions are the largest source of the hadronic uncertainty in these experiments. We estimate the forward Compton scattering subtraction function and corresponding correction to the Lamb shift of 2S level in muonic hydrogen from the proton structure function data in high-energy and resonance regions. We also compare the existing models of the elastic contribution to TPE correction in lepton-proton scattering. A subtracted dispersion relation formalism for the TPE in electron-proton scattering has been developed and tested. Its relative effect on cross section is in the 1-2 % range for a low value of the momentum transfer. For the inelastic TPE contribution, the low momentum transfer expansion was studied, and a good agreement with the experimental TPE fit to electron data was found. Predictions are also given for a forthcoming muon-proton scattering experiment (MUSE).