The structural and electronic properties of boron and nitrogen atom substitutional doping in (8,0)@(13,0) (semiconductor@semiconductor) and (6,0)@(13,0) (metallic@semiconductor) double walled carbon nanotubes, were obtained by using the first-principle calculations based on the density functional theory. In this framework, the electronic density plays a central role and it was obtained from a self-consistent field form. When boron or nitrogen substitutes a carbon atom the structure remains practically the same with negligible deformation observed around defects in all configurations considered. The electronic band structure results indicate that the boron doped systems behave as a p-type impurity, however, the nitrogen doped systems behave as an n-type impurity. In all the systems investigated here, we found that, in the cases of semiconductor@semiconductor tubes, they were the easiest to incorporate a B atom in the outer-wall and an N atom in the inner-wall of the nanotube.