To balance the given equation using algebraic method, assign variables to the coefficients of each substance, for example, in this case:

The coefficient of KNO3 is a, for H2CO3 is b, for K2CO3 is c and for HNO3 is d.
Now, make an element balance per each element present in the reaction. For example, for potassium, in the reactants it is present a times, in the products it is present 2c (coefficient times subscript), it means that:

For oxygen, in the reactants it is present 3a+3b times, in the products it is present 3c+3d times:

For nitrogen:

For hydrogen:

For carbon:

Now, the statement tells us to use 2 as the value of a. Using this value and the algebraic equations stated, we can find the b, c and d:



Now, that we have the values for a, b, c and d, we can replace them in the chemical equation to obtain the balanced equation:
