J.R. S. answered 10/07/20
Wow, that's a lot of stuff to cover in a written response, but I'll try to get you going. To tell what the subscripts are, you need to understand a little about valence and valence electrons, etc. You look at the periodic table to get some guidance. Examples might help:
For sodium chloride we have Na and Cl. Na is in group one so is +1. Chlorine is group 7 and is -1, so the bond in a 1:1 ratio = NaCl
If you have magnesium chloride, Mg is group 2 so is +2 and you need 2 Cl to balance it = MgCl2
For aluminum chloride, Al is group 3 so it is +3 and you need 3 Cl to balance it = AlCl3
No parentheses are needed because you don' t have a polyvalent cation or anion. For that, an example might be magnesium hydroxide. Mg is +2 and hydroxide is OH (polyatomic) and is -1, so you need two of them.
Magnesium hydroxide = Mg(OH)2 and you need parentheses to show the subscript 2 applies to both the O and the H and not just the H.
The question you posed is hydrochloric acid reacting with calcium chloride.
First you must be able to write each compound.
Hydrochloric acid = HCl
Calcium chloride = CaCl2 (Ca group 2 has +2 charge and Cl group 7 has -1 charge)
In fact, there really is no reaction between HCl and CaCl2, but that's another lecture.
Hope this was of some help. If you don't get it, you should probably have a 1 hour tutoring session online. Find yourself a good tutor, and go for it.