When NH₄OH and CaS are mixed the following reaction occurs:
NH₄OH + CaS ---> Ca(OH)₂ + (NH₄)₂S
Ca(OH)₂ is a poorly soluble base in water. So the formula of the precipitade formed is Ca(OH)₂ and its name is calcium hydroxide.
Bases with cations of the group II of the periodic table are generally poorly soluble in water.