Regioselectivity in the formation of an imidazo[1,2-a]pyrimidine
I propose the route in the following scheme. I don’t see any unfavourable intermediates. In short, the first step would be formation of a Schiff base with the extracyclic amino group and the aldehyde. This — in one of many orientations as shown below — places the bromide nicely so that one of the pyrimidine nitrogens can attack it nucleophilicly. Upon displacement, an intermediate nitrogen-centred cation is generated; loss of a proton and switching of electrons regenerates aromaticity and gives the desired product.


Scheme 1: Proposed reaction scheme. The attacking nitrogen $\mathrm{sp^2}$ orbital in step 2 is drawn explicitly.

We can draw structures of the Schiff base intermediate that would allow either of the pyrimidine nitrogens to attack. However, the top one experiences a stronger $-I$ effect by the neighbouring $\ce{CF3}$ group hence its electron density and nucleophilicity should be reduced. The para-nitrogen does not experience this inductive effect since it greatly weakens with greater distance.

The ortho-nitrogen’s lone pair is indeed affected since inductive effects affect both &#x3c3; and &#x3c0; bonds while mesomeric effects mainly affect &#x3c0; electrons only.