Answer:
Well by looking at the products,it must be sodium bicarbonate (NaHCO3)
Explanation:
but then sodium bicarbonate does not remove permanent hardness of water,that compound is washing soda(Na2CO3) which should not be confused with NaHCO3. So as it would appear,the premise of the question is wrong but there is a compound that reacts with HCl to give those products