Note that $\angle FBE = 90^\circ$. Then by applying Pythagoras Theorem to $\Delta BEF$, we have
$\begin{array}{rcl}
BF^2 & = & EF^2 – BE^2 \\
BF^2 & = & 5^2 – 4^2 \\
BF & = & 3 \text{ cm}
\end{array}$
In $\Delta BEF$ and $\Delta CDF$,
$\begin{array}{rcll}
\angle BFE & = & \angle CFD & \text{(vert. opp. $\angle$s)} \\
\angle EBF & = & \angle DCF & \text{(alt. $\angle$s, $EB//CD$)} \\
\angle BEF & = & \angle CDF & \text{(alt. $\angle$s, $EB//CD$)}
\end{array}$
Therefore, $\Delta BEF \sim \Delta CDF\ \text{(A.A.A.)}$.
Hence, we have
$\begin{array}{rcll}
\dfrac{BF}{CF} & = & \dfrac{BE}{CD} & \text{(corr. sides, $\sim \Delta$)} \\
\dfrac{BF}{BC – BF} & = & \dfrac{BE}{CD} \\
\dfrac{BF}{CD – BF} & = & \dfrac{BE}{CD} & \text{(definition of square)} \\
\dfrac{3}{CD – 3} & = & \dfrac{4}{CD} \\
3CD & = & 4CD – 12 \\
CD & = & 12 \text{ cm}
\end{array}$
By applying Pythagoras Theorem to $\Delta CDF$, we have
$\begin{array}{rcl}
DF^2 & = & CD^2 + CF^2 \\
DF^2 & = & CD^2 + (BC – CF)^2 \\
DF^2 & = & 12^2 + (12 – 3)^2 \\
DF & = & 15\text{ cm}
\end{array}$