The reaction X2 and light is the halogenation of an alkane reaction. Bromine is selective for the position that gives it the most stable radical. The carbon that is adjacent to the double bond is the most stable position making it the most stable radical.
Hope that helpss