In this work, polycyclic heterocycles containing spirooxindole, pyrrolidine, and thioxothiazolidin-4-one rings have been synthesized via the regioselective 1,3-dipolar cycloaddition of azomethine ylide, which is generated in situ by the condensation of the dicarbonyl compound isatin and the secondary amino acid (l-proline), with 5-arylidine-2-thioxothiazolidin-4-one as the dipolarophile. The structure of the synthesized compounds 4a and 4b were determined by using X-ray single crystal diffraction, and also, Hirshfeld surface analysis were reported. Their geometric parameters were calculated using density functional theory at the B3LYP/6-311G (d,p) level of theory. Both compounds showed antimicrobial and antifungal activity better than selected standards (ampicillin and gentamicin in case of antibacterial activity and Amphotericin A and fluconazole in case of antifungal activity). Molecular docking study of the synthesized compounds indicated that phenyl group plays an important role in determination of compound interaction inside the receptors.