Step-by-step explanation:
Bromine is a group 17 element and contains 7 valence electrons. And, in order to completely fill its octet it needs to gain just one electron. When it chemically combines with another substance and forms a compound with chemical formula as
then it means charge on substance X is +2.
For example, compound formed between magnesium and bromine is magnesium bromide and its chemical formula will be
.
Any element of group 2 can react with bromine to form a compound with chemical formula
.