I'm working in India in a hospital which has a mosque beside a church, Hindu temple and Sikh temple (all of these were built by the owner of the hospital who is Hindu). Can we pray in this mosque?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Praying in this mosque is valid and lawful regardless of whoever built it. The doubt that the mosque is close to a church or temples does not change the ruling.
The scholars are agreed about the lawfulness of praying in the church if it does not contain any pictures, statues, or impurities.
Allah knows best.
You can search for fatwa through many choices