Competing mechanisms of plasma transport in inhomogeneous configurations with velocity shear: The solar-wind interaction with earth's magnetosphere