Since you are not using any property specific to complex numbers, it seems a bit silly to think of the vertical axis as an "imaginary axis". It is simpler to think of this as just a Cartesian coordinate system so that A is at (3, 4) rather than "3+ 4i" and B is at (-5, 2) rather than -5+ 2i.
In either case, the distance between them is sqrt((3- (-5))^2+ (4- 2)^2)= sqrt(64+ 4)= sqrt(68)= 2sqrt(17).