Construct triangle $DEB$. The sides $DE=BE=10, DB=12$ (Pythagorean theorem). Let $O$ be point of intersection of $AE$ and $DB$. Then $EO$ is the height in isosceles $\triangle DEB$.
We also know that the diagonals of square bisect so $OB=OC=6$. Thus, $EO=\sqrt{10^2-6^2}=8$.
Finally, $x=EO-OC=2.$