An analytical chemist is investigating an unknown crystalline salt XXX. They dissolve a sample of X X\,X in deionised water to form an aqueous solution, which is then split into two portions:
To the first portion, the chemist adds dilute nitric acid followed by silver nitrate solution. A cream precipitate forms, which is insoluble in dilute aqueous ammonia but dissolves upon the addition of concentrated aqueous ammonia. Identify the chemical formula of the anion present in salt XXX.
To the second portion, the chemist adds aqueous sodium hydroxide dropwise until it is in excess. A white precipitate forms initially, which then redissolves in excess sodium hydroxide to form a colourless solution. Identify the chemical formula of the cation present in salt XXX.