Linking Atmospheric Chemistry of the Hot Jupiter HD 209458b to Its Formation Location through Infrared Transmission and Emission Spectra