Alkyl halide reaction
To reflect on the comments below:
In literature this reaction seems to actually produce product A and synthesis of product B seems to require much more exotic conditions than described in the question. As such I have to conclude that the correct answer would have be A.



Old answer:

Due to the polar aprotic solvent (DMF) one would think Sn2 is favoured as the reaction mechanism, however if the product is indeed B it would suggest an Sn1 mechanism where the aromatic ring stabilises the cation. One of the resulting resonance structures would indeed react with fluoride. Due to the stability of aromatics the product is formed by re-aromatisation.