The electronic structure of La1.85Sr0.15CuO4, as well as the two cases of substitution of Ga and Sn for Cu, has been studied by the recursion method. The change of hole concentration and the effective local magnetic moment have also been calculated. Our calculations show that Ga and Sn destroy the two-dimensional character of the CuO2 plane and lead to the disorder of the electronic structure, accompanied by the migration of electrons which causes the decrease of the hole concentration in the CuO2 Planes. From our point of view, these changes may be responsible for the destruction of superconductivity of the Ga and Sn-doped systems.