First of all, you need to understand that the twelve immortals of the Ten Heavenly Stems are different from the twelve immortals of the Five Elements. Your question "Fire is born in Yin, Emperor is prosperous in the afternoon, and Mu Ku is in Xu" should refer to the twelve earthly branches corresponding to the twelve immortals of fire in the five elements (metal, wood, water, fire, and earth). And the Ding fire you are talking about refers to the twelve earthly branches corresponding to the twelve immortals of the ten heavenly stems. The formula is: Jiahai, Yiwu, Bingwuyin, Gengsi, Xinzi and Renshen, Dingji is in Yougui and Mao.