Enhancing light transmission through a disordered waveguide with inhomogeneous scattering and loss