The Permanent hardness of water is due to compound A. One of the method to remove permanent hardness of water is B whereas the temporary hardness of water is due to compound X. Boiling this compound converts X to compound Y. A, B, X, and Y, respectively can be: