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. An alternative dispersive evaluation of the TPE correction to the hydrogen hyperfine splitting was found and applied. 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. We compare the resulting TPE with VEPP-3 and CLAS data and give predictions in OLYMPUS kinematics and for a forthcoming muon-proton scattering experiment (MUSE).