Human carbonic anhydrase (CA) isoenzymes IX and XII are overexpressed in cancer cells, contributing to tumor microenvironment acidification and representing important targets for cancer therapy. In this study, we identified compound V35 (ZINC09419065) as a selective inhibitor of CA IX and CA XII with enhanced binding stability and selectivity compared to standard inhibitors. We analyzed conserved regions in CA I, CA II, CA IX, and CA XII to investigate their isozyme selectivity, revealing critical selectivity determinants at positions 95, 141, and 203. Molecular docking results indicated that V35 interacts robustly with CA XII, forming a metal ion coordination complex with Zn via HIS94, HIS96, HIS119, and THR199, similar to the interaction pattern of standard inhibitor SLC-0111. Molecular dynamics (MD) simulations conducted over 500 ns under hypoxic conditions showed that V35 has high binding stability, with root mean square deviation (RMSD) and fluctuation (RMSF) values comparable to SLC-0111, demonstrating its conformational stability in CA XII. Binding free energy calculations using the MMGBSA method showed that V35 achieves binding free energy of -44.17 kcal/mol with CA XII, closely matching SLC-0111 (-49.41 kcal/mol). Density functional theory (DFT) calculations further highlighted V35's electrostatic potential distribution, supporting its isozyme selectivity. Post-dynamics analysis indicated that the ester functional groups and the inward movement of HIS64 stabilize V35's interactions in CA XII, a feature absent in CA I.