  We compute an $\mathcal{O}\left(\alpha^2(Z\alpha)^6\right)$ contribution to
the hydrogen-atom Lamb shift arising from the light-by-light scattering.
Analogous diagrams, with one atomic electric field insertion replaced by an
external magnetic field, contribute to the gyromagnetic factor of the bound
electron at $\mathcal{O}\left(\alpha^2(Z\alpha)^4\right)$. We also calculate
the contribution to the gyromagnetic factor from the muon magnetic loop.
