Airflow, heat, and contaminant transfer in a mechanically ventilated two-dimensional rectangular enclosure by discrete heat and contaminant sources as well as external forced convection at various inlet and outlet locations is numerically simulated. Two different enclosure configurations are considered. In configuration A, the cold air is injected at the top of the left vertical wall and exited at the bottom of the right vertical wall. In configuration B, the cold air is injected at the lower edge of the left vertical wall and exited at the top of the right vertical wall. The objective of the study is to find the relative locations of inlet and outlet in order to obtain more effective cooling in the core of the enclosure by maximizing the heat and contaminant removal rate and reducing the overall temperature. The developed mathematical model is governed by the two-dimensional continuity, momentum, energy, and concentration equations. The governing equations in Cartesian co-ordinates are solved by finite volume based semi-implicit method for pressure linked-equations (SIMPLE) algorithm based on a staggered grid system. Results are presented for different values of the Reynolds number, Grashof number, Sherwood number, and Buoyancy ratio in the laminar regime. A convective transport visualization technique is used to study the behavior of physical phenomena due to stream function, thermal, and solutal functions. The results indicate that cooling inside the core of the enclosure is most effective when the inlet is kept at the bottom of the left vertical wall.