The Question :
Two opposite vertices of a square are represented by complex numbers $9+12i$ and $-5+10i$. Find the complex number representing the other two vertices of the square.
My attempt :
Considering $ABCD$ as the square and $O$ as the origin the known points $A$ and $C$
$OA= 9+12i$
$OC= -5+10i$
By vector addition : $OA=OC+CA$ therefore , $CA=OA-OC$ we get, $CA=9+12i+5-10i=14+2i$
rotating $AC$ using polar for onto $AB$ (Clockwise) $AB=\sqrt{2} CA (\cos 45+ i \sin 45 )$ (45 degrees)
$AB=(14+2i)(1+i)$
$AB=14+14i+2i-2$
$AB=12+16i$
$OA+AB=OB$
$9+10i+12+16i=OB $
$OB=21+26i$ however the answer in the book is $1+18i$ and $3+4i$
The center of the square is $\frac{A+C}2=2+11i$. So, $MA=7+i$ and you get another vertex $B$ of the square rotating $A$ around $M$ by $\frac\pi2$ radians. That is$$B=M+iMA=1+18i.$$And you'll get the fourts vertex $D$ doing the smae thing, but with an angle of $-\frac\pi2$ radians:$$D=M-iMA=3+4i.$$Your error was to rotate around the origin.