Addition of Br2 to Double Bond and Carboxylic Acid
The first intermediate is indeed Br+ atom attached to the double bond forming a cycle (see step one):

 On the next step, however, oxygen of carboxylic acid attacks the intermediate and forms the product you show on second figure. This happens because carboxylic acid group is in the right position for intramolecular reaction. 

First step follows the diagram. In second step the attacking nucleopline is not Br$^-$, but R-COOH or RCOO$^-$ depending on the reaction condition. To obtain high yield of the cyclic product on your second figure you need to slowly add dilute solution of Br$_2$ to a solution of organic reagent. If you add Organic reagent to neat (pure) Br2, then you get a significant amount of the product you predicted on figure 1. Don't do it in real life because a reaction of neat bromine with alkenes is violent and dangerous.