In this articale, we have described a new practical cyclocondensation synthesis for a series of [1,2,4]triazolo[4,3-c]pyrido[3,2-e] pyrimidine and pyrido[2',3':4,5] pyrimido[6,1-c][1,2,4] triazine from 2-amino-3-cyano-4.6-diarylpyridines. Also polyheterocyclic compounds containing [1,2,4]triazolo and [1,2,3,4]tetrazolo moieties were also synthesized through the reactions of 3-hydrazino-8,10-diaryl [1,2,4]triazolo[4,3-c]pyrido[3,2-e]pyrimidine with both formic acid and the formation of diazonuim salt respectively . Newly synthesized heterocycles structures were confirmed using elemental analysis, IR, 1H-NMR, 13C-NMR and mass spectral data. DFT and computational studies were carried out on five of the synthesized poly heterocyclic compounds to show their structural and geometrical parameters involved in the study. Molecular docking using Tankyrase I enzyme as a target showed how the studied heterocyclic compounds act as a ligand interacting most of active sites on Tankyrase I with a type of interactions specified for H-bonding and VDW. We investigated that the five studied ligands act as inhibitors for different active sites along the target. The molecular docking study also revealed that the compound 6c was the most effective compounds in inhibiting Tankyrase I enzyme (2rf5), this result can help strongly in inhibition of carcinogenic cells and cancer treatment.