$$\text { If } A=\left[\begin{array}{ll} 1 & 0 \\ 2 & 1 \end{array}\right], B=\left[\begin{array}{ll} x & 0 \\ 1 & 1 \end{array}\right] \text { and } A=B^2 \text {, then } x \text { equals: }$$