Exploring The Interplay Between Star Formation And Active Galactic Nuclei And The Role Of Environment In Galaxy Evolution