Answer
$x=1 \pm \frac{ \sqrt {6}}{2}$
Work Step by Step
As we know $a \cdot b = |a| |b| cos \theta$
Here, $a \cdot b= \lt 2,1,-1 \gt \cdot \lt 1,x,0 \gt=2+x$
$2+x=(\sqrt 6) (\sqrt {1+x^2})cos 45^\circ$
$2+x=(\sqrt 6) (\sqrt {1+x^2})\dfrac{\sqrt 2}{2}$
$(2+x)^2=(\sqrt 3\sqrt {1+x^2})^2$
$x^2+4+2x=(\sqrt 3\sqrt {1+x^2})^2$
$x^2+4+2x=3+3x^2$
$2x^2-4x-1=0$
$x=\frac{4 \pm \sqrt {24}}{4}$
Hence, $x=1 \pm \frac{ \sqrt {6}}{2}$