The way I see it, you can go one of two routes. Pray to the god of fire for control or to the god of water to extinguish. Either way, I have you covered.
Prayer to Hephaestus, God of Fire:
Mighty Hephaestus, master of flames, bearer of the forge's eternal blaze, we beseech thee, hear our humble plea. Grant us thy strength, thy sacred decree. In thy domain, where infernos dance, guide our hands with thy fiery lance. Control the flames that rage untamed, let not destruction be our name. Protector of craftsmen, artisan divine, in thy power, may safety shine. With thy wisdom, bring us clarity, shield us from fire's calamity. Hephaestus, hear our fervent call, bless us with thy watchful thrall. Temper the fire, let it be still, in thy name, we seek thy will.
Prayer to Neptune, God of Water:
Neptune, ruler of the boundless sea, master of waves and depths so free, we implore thee, in this hour of dread, quell the flames with thy watery spread. From thy realm where currents flow, with thy trident's mighty blow, extinguish the fire that threatens all, let thy waters answer our call. In thy oceanic embrace, we find solace, in thy currents, let safety chase. Bring forth thy torrents, thy soothing might, douse the flames, restore the night. Neptune, guardian of the aquatic domain, heed our plea amidst the fiery reign. With thy waters, wash away the ire, in thy name, extinguish the fire.