The formula of a distance between two points:
[tex]d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}[/tex]
We have the points (x, 2) and (1,4) and the distance d = √13.
Substitute:
[tex]\sqrt{(1-x)^2+(4-2)^2}=\sqrt{13}\\\\\sqrt{(1-x)^2+2^2}=\sqrt{13}\\\\\sqrt{(1-x)^2+4}=\sqrt{13}\iff(1-x)^2+4=13\qquad|-4\\\\(1-x)^2=9\iff1-x=\pm\sqrt9\\\\1-x=-3\ \vee\ 1-x=3\qquad|-1\\\\-x=-4\ \vee\ -x=2\qquad|\text{change the signs}\\\\\boxed{x=4\ \vee\ x=-2}[/tex]