You have to balance the equation. This is, you must place the coefficients in front of each compund so that the number of atoms of each element in the reactants equal the number of atoms of the same element in the products.
You can do that by simple inspection:
2HBr + Mg(OH)2 ---> MgBr2 +2H2O
Verify:
Reactants Products
element
H 2 + 2 = 4 2*2 = 4
Br 2 2
Mg 1 1
O 2 2
Which confirms the equation is balanced.
Answer: 2HBr + Mg(OH)2 --> MgBr2 + 2H2O