CaCO3 + 2KCL ⇒ CaCl2 + K2CO3
It is balanced as so based on the charges given on the periodic table and polyatomic ions.
Calcium has the charge of 2 but CO3 also shares the same charge, thus cancelling that out.
Potassium has a charge of 1 while Chlorine also shares a charge of 1, also cancelling it out.
Thus, if it performs a double replacement reaction, they would take these charges to the new elements that do not cancel out their charges.
Therefore, we need the coefficient of 2 in front of Potassium Chloride in order to balance the equation as on the products side of the equation, Potassium and Chlorine both have a subscript of 2.
Hope this helps!