This study investigates the influence of a rectangular heat source on magnetohydrodynamic hybrid convection flow in a lid-driven cavity. The effects of various parameters, such as the heat source size, magnetic field strength, and heat absorption/generation, are analyzed. The results show that increasing the heat source size decreases the average Nusselt number along the heated wall. The average Nusselt number also decreases with higher magnetic field strength and heat generation, while it increases with heat absorption. The major finding is to apply an important technique the Galerkin weighted residual technique of the finite element (FE) method to solve the non-dimensional equations and the associated boundary conditions. The isotherms are used to show the temperature distribution in a domain. Streamline present the flow field in the enclosure. However, it is easy to realize the direction and intensity of the heat transfer particularly in convection problems which the path of heat flux is perpendicular and the isotherm due to convection effect. Thus, the purpose of this research is to study the results of mixed convection. The effects of location and height of the partitions are considered for the various Richardson numbers. Fluid flow field, thermal field and heat transfer are presented through the streamlines and isotherms, respectively. Results are substantiated relating to the published work.