Let $ABCD$ and $BNMK$ be two nonoverlapping squares and let $E$ be the midpoint of $AN$. If point $F$ is the foot of the perpendicular from $B$ to the line $CK$, prove that the points $E, F, B$ are collinear.
My solution using complex numbers:
We consider a complex plane with the origin at $F$ with $CK$as the real and $FB$ as the imaginary axis.
Let $c, -k, bi$ denote the coordinates of the points $C, K, B$ where $c, k, b \in \mathbb{R}$. Likewise denote the coordinates of all other points with corresponding small letters. Let $i=\sqrt{-1} $ denote the imaginary unit.
The rotation about $B$ with an angle $\theta =\Large \frac{\pi}{2}$ maps the point $C$ to $A$.$$\large \therefore a=bi+(c-bi)e^\frac{i\pi}{2}=b(1+i)+ci$$
And a rotation about $B$ with $\theta=\Large-\frac{\pi}{2}$ maps $K$ to $N$.$$\large \therefore n=bi + (-k-bi)e^\frac{-i\pi}{2}= b(1-i)+ki$$
The coordinates of $E$ are therefore$$\large e=\frac{a+n}{2} = bi + (c+k)i$$ And hence $E$ lies on $FB$.
Is the solution correct? I want to prove it only through complex numbers because I want to learn bashing through complex numbers to help me in Olympiads, even though I know it looks and feels ugly.
Please point out any mistakes, if there are any. Thank you for the help.

I think it's simpler if you take $B$ as origin. Then $E={1\over2}(N+A)$. From $K=iN$ and $C=-iA$ we obtain $K-C=i(N+A)$, hence $\vec{CK}$ is orthogonal to $\vec{BE}$.