You could protect the aldehyde function of 2,5-dibromobenzaldehyde as the acetal, then react it with an excess of sodium methoxide in methanol using a catalytic amount of Copper(I)bromide, followed by hydrolysis of the acetal to get 2,5-dimethoxybenzaldehyde.
Both instructions for acetal formation and methoxylation can be found at my page, but exemplified for 3,4,5-trimethoxybenzaldehyde and 5-bromovanillin respectively.