How do I know the formula for salts formed in a reaction?

GCSE