It may be remembered that both V1 and V2 are with respect to the ground.
R = 6 + 4 + 2 = 12Ω
∴ V1 = drop across R2 = 24 × 4/12 = + 8 V
V2 = drop across R3 = − 24 × 2/12 = − 4V
It should be noted that point B is at negative potential with respect to the ground.
Current flows from A to B i.e. from a point at a higher potential to a point at a lower potential.