When there is an electronegative group close to the acidic hydrogen, an effect called "induction" happens.
If you draw the conjugate bases of the 2- and 3-bromobutyric acids, the oxygen from both structures will have a negative charge. So the difference arises from the location of the bromine, one is closer and the another is farther away.
Bromine will withdraw electron density away from the negatively charged Oxygen by an inductive effect. This stabilizes the negative charge by spreading it out, as opposed to keeping it concentrated to the oxygen.
If the conjugate base is more stable, it is weaker so its acid must be stronger.