The effect of constituent atoms on the physical properties of the MAX phase compounds M(2)AC and M(2)AB (M = Nb or Mo and A = Al or Ga) was studied theoretically. The obtained results showed that each MAX atom affects structural properties such as the equilibrium lattice constants, cohesive energy, and bulk modulus. Also, the thermodynamic stability was confirmed where all compounds have negative formation enthalpies. Voigt-Reuss-Hill approximations have been used to examine the mechanical stability of these compounds; various parameters for this purpose have been found such as Poisson's ratio, shear, bulk modulus, and Young's modulus. We applied the modified Becke-Johnson approximation (mBJ) to calculate the electronic band structure also total and partial density of states. Also, the study expanded towards the thermal properties, where the temperature dependency of the heat capacities at volume (C-v), the entropy (S), and the thermal expansion coefficient (alpha) are investigated. The semi-local Boltzmann transport theory has been used to investigate thermoelectric properties. By comparing the properties of the compounds according to their constituent atoms, we found that all the studied compounds have ceramic-metallic characters in particular Mo2AlC alloy, which have high cohesion energy and resist to pressure more than other compounds. In addition, it has electronic conductivity, high thermal conductivity, and a medium thermal absorption coefficient. We also recognized that each compound has a distinguishing feature: Mo2AlC has isotropic elastic characteristics, although Mo2GaC has high electrical (sigma/tau) and thermal conductivity (kappa/tau), whereas Nb2AlC has a low thermal expansion coefficient, and Nb2AlB has a greater heat capacity.