  We investigate the transport properties of two photons inside a
one-dimensional waveguide side-coupled to a single-mode nonlinear cavity. The
cavity is filled with a nonlinear Kerr medium. Based on the Laplace transform
method, we present analytic solution of quantum states of the transmitted and
reflected two photons, which are initially prepared in a Lorentzian wave
packet. The solution reveals how quantum correlation between the two photons
emerge after the scattering by the nonlinear cavity. In particular, we show
that the output wave function of the two photons in position space can be
localized in the relative coordinates, which is a feature that may be
interpreted as a two-photon bound state in this waveguide-cavity system.
