Ring closure via intramolecular nucleophilic substitution or intermolecular dimerization: which is favoured?
I'd also like to add that the intramolecular cyclisation that you proposed is a 5-exo-tet reaction according to Baldwin's classification.


The ring being formed is 5-membered.
The bond being broken (the $\ce{C-Br}$ bond) is outside the ring, or exocyclic.
The carbon being attacked is a $\mathrm{sp^3}$-hybridised carbon with tetrahedal geometry.


If you look up Baldwin's rules, you'll see that 5-exo-tet reactions are perfectly fine and allowed. Evidently the compound you drew can twist itself a little bit to accommodate the linear transition state. (I am using "linear" loosely to refer to the arrangement of the incoming nucleophile, the carbon, and the leaving group.) Therefore, in this case, the intramolecular reaction will predominate, as is usual.

The disfavoured reactions that you cited from those textbooks are 6-endo-tet reactions. In such compounds, having a linear transition state is an issue as it would lead to too much ring strain.

As an ending note: Baldwin's rules are nothing more than an empirical observation. You might ask why 5-exo-tet reactions are fine, but not 6-endo-tet: where is the threshold or boundary which makes something favoured or disfavoured? The answer is, they did the experiments and found out that that's just how it is. No more, no less.