  We consider the inelastic scattering of two photons from two qubits separated
by an arbitrary distance $R$ and coupled to a one-dimensional transmission
line. We present an exact, analytical solution to the problem, and use it to
explore a particular configuration of qubits which is transparent to
single-photon scattering, thus highlighting non-Markovian effects of inelastic
two-photon scattering: Strong two-photon interference and momentum dependent
photon (anti-)bunching. This latter effect can be seen as an inelastic
generalization of the Hong--Ou--Mandel effect.
