First step is to determine the valency of each of x and CaCO3 from the given compounds:
1- As for Li2CO3: we can deduce that the valency of lithium is one while that of CO3 is two
2- As for XCl3: we can deduce that the valency of chlorine is one while that of X is three
Second step is to write the required compound:
X : CO3 (elements involved)
3 : 2 (write the valency of each)
Then write the positive ion (X) followed by the valency of the negative ion (2) and then the negative ion (CO3) followed by the valency of the positive ion (3).
The final x carbonate is written as: X2(CO3)3