A geometry question... In the given figure, $ABCD$ is a square of side $3$cm. If $BEMN$ is another
square of side $5$cm & $BCE$ is a triangle right angled at $C$. Then the
length of $CN$ will be:-
I plotted this on GeoGebra:

I can't figure out how to use the smaller square for the question. I did try finding the area of triangle $CBN$. For that I tried subtracting the area of $CEMN$, but to no avail. I want to approach this problem mathematically rather than graphically.
I highly suspect that there is a way to involve the smaller square somehow. Or, if I somehow prove that $\triangle BCE\sim  \triangle CBN$, that could solve it.
 A: 
Extend $CB$ and drop a perpendicular from $N$ to this extension. Let the intersection be $H$.
We see that $\triangle BCE \cong \triangle NHB$. Indeed, $\angle NHB = \angle BCE = 90^\circ$ and $NB = BE$.
We also have $\angle NBH = 180^\circ - \angle NBE - \angle CBE = 180^\circ - \angle BCE - \angle CBE = \angle BEC$. Hence congruence follows by AAS.
Now $BC = NH = 3cm$ and $NB = BE = 5cm$. By Pythagoreas theorem, $HB = CE = 4cm$, and $NC^2 = HC^2+NH^2 = (3+4)^2+3^2$.
A: Rotation around $B$ for $-90^{\circ}$ takes $C$ to $A$ and $N$ to $E$, so it takes $CN$ to $AE$. So $$CN = AE = \sqrt{3^2+7^2}=\sqrt{58}$$
A: $BC = 3, BN = 5, \sin (\angle CBE) = \frac{4}{5}$
Using Cosine law, $CN^2 = BN^2 + BC^2 - 2 BN \times BC \times \cos (\angle CBN) = 5^2 + 3^2 + 2 \times 5 \times 3 \times \sin (\angle CBE)$
$= 34 + 24 = 58 \implies CN = \sqrt{58}$
[$\cos (\angle CBN) = \cos (90^0 + \angle CBE) = - \sin (\angle CBE$)]
A: 
Use coordinate geometry.
Let $B$ be the origin. Recall that for two lines to be perpendicular, $m_1 m_2 = -1$. Now let the line perpendicular to the line passing through $(0, 0)$ and $(4, -3)$ pass through $(a, b)$. We have that $m_1 = -\frac{3}{4}$ and $m_2 = \frac{b}{a}$, so $m_1 m_2 = -\frac{3}{4} \frac{b}{a} = -1$, and  $\frac{b}{a} = \frac{-1}{-3/4} = \frac{4}{3}$ (note that there are an infinite number of points satisfying this condition).
$b = 4, a = 3$ or $(3, 4)$ satisfies this condition, and it has the same distance to $B$ as $(4, -3)$, as the absolute $x$ and $y$ distances are the same, thus Pythagoras's theorem is not affected.
Now move the origin $(0, 0)$ back to $D$. Therefore $N$ is $3$ units right and $4$ units up from $B$, which is at $(3 + 3, 3 + 4) = (6, 7)$. Now just find the distance between $C = (3, 0)$ and $N = (6, 7)$.
