Although enhanced oil recovery (EOR) is often achieved by CO2 injection, the use of acid gases has also been attempted, for example in oil fields in west Canada. To design EOR technologies effectively, it would be beneficial to quantify the molecular mechanisms responsible for enhanced recovery under various conditions. We report here molecular dynamics simulation results that probe the potential of recovering n-butane confined from silica, muscovite and magnesium oxide nano-pores, all proxies for subsurface materials. The three model solid substrates allow us to identify different molecular mechanisms that control confined fluid behavior, and to identify the conditions at which different acid gas formulations are promising. The acid gases considered are CO2, H2S, as well as their mixtures. For comparison, in some cases we consider the presence of inert gases such as N2. In all cases, the nanopores are dry. The recovery is quantified in terms of the amount of n-butane displaced from the pore surface as a function of amount of gases present in the pores. The results show that the gas performance depends on the chemistry of the confining substrate. While CO2 is more effective at displacing n-butane from the protonated silica pore surface, H2S is more effective in muscovite, and both gases show similar performance in MgO. Analysis of the interaction energies between the confined fluid molecules and the surface demonstrates that the performance depends on the gas interaction with the surface, which suggests experimental approaches that could be used to formulate the gas mixtures for EOR applications. The structure of the gas films at contact with the solid substrates is also quantified, as well as the self-diffusion coefficient of the fluid species in confinement. The results could contribute to designing strategies for achieving both improved hydrocarbon production and acid gas sequestration.