In this paper we present a hybrid approach to numerically solve two-dimensional electromagnetic inverse scattering problems, whereby the unknown scatterer is hosted by a possibly inhomogeneous background. The approach is 'hybrid' in that it merges a qualitative and a quantitative method to optimize the way of exploiting the a priori information on the background within the inversion procedure, thus improving the quality of the reconstruction and reducing the data amount necessary for a satisfactory result. In the qualitative step, this a priori knowledge is utilized to implement the linear sampling method in its near-field formulation for an inhomogeneous background, in order to identify the region where the scatterer is located. On the other hand, the same a priori information is also encoded in the quantitative step by extending and applying the contrast source inversion method to what we call the 'inhomogeneous Lippmann-Schwinger equation': the latter is a generalization of the classical Lippmann-Schwinger equation to the case of an inhomogeneous background, and in our paper is deduced from the differential formulation of the direct scattering problem to provide the reconstruction algorithm with an appropriate theoretical basis. Then, the point values of the refractive index are computed only in the region identified by the linear sampling method at the previous step. The effectiveness of this hybrid approach is supported by numerical simulations presented at the end of the paper.