Exercise II 2.8 on Hartshorne's Algebraic Geometry There are many people asking about exercises on this book. I've tried to check existing similar questions as many as I can, but I can't promise to have read everything. Sorry if this is duplicated.

Let $X$ be a scheme. For any point $x \in X$, we define the Zariski tangent space $T_x$ to $X$ at $x$ to be the dual of the $k(x)$-vector space $\mathfrak m_x/\mathfrak m_x^2$. Now assume that $X$ is a scheme over a field $k$, and let $k[\varepsilon]/\varepsilon^2$ be the ring of dual numbers over $k$. Show that to give a $k$-morphism of $\text{Spec} k[\varepsilon]/\varepsilon^2$ to $X$ is equivalent to giving a point $x \in X$, rational over $k$ (i.e., such that $k(x) =k$), and an element of $T_x$.

My Attempts: Suppose that $x \in X$ and $\alpha \in T_x$ is given. I think of determining the map of underlying topological spaces $f: \text{Spec} k[\varepsilon]/\varepsilon^2 \rightarrow X$. $k[\varepsilon]$ is a PID, so is $k[\varepsilon]/\varepsilon^2$. The nonzero ideals of $k[\varepsilon]/\varepsilon^2$ are of the form $(\varepsilon+a)$ for $a \in k$. (Right?) Some $(\varepsilon+a) = f^{-1}(x)$. Then $$f^{\sharp}: \mathcal O_x \rightarrow (k[\varepsilon]/\varepsilon^2)_{(\varepsilon+a)}.$$ Also $$\mathfrak m_x \rightarrow (\varepsilon+a)\text{ (in } k[\varepsilon]/\varepsilon^2 \text{)}$$ $$\mathfrak m_x/\mathfrak m_x^2 \rightarrow (\varepsilon+a)/(\varepsilon+a)^2 \text{ (in } k[\varepsilon]/\varepsilon^2 \text{)}.$$ Even if this map is given by $\alpha \in T_x$, how can we get the whole $f$? In the other direction, when the $k$-morphism $f: \text{Spec}k[\varepsilon]/\varepsilon^2 \rightarrow X$ is given, how can it determine $x \in X$ and some $\alpha \in T_x$?
 A: Source: Bryden R. Cais' online solution.
Denote $A=k[\epsilon]/\epsilon^2$ the regular local ring. We can see that $A$ has only one prime ideal, namely $m=\epsilon A$ the maximal ideal. Each element of $m$ is in the form of $\lambda\epsilon,\lambda\in k$. Use the isomorphism $m/m^2\to k,\lambda\epsilon\mapsto \lambda$ to identify the two. Let $\eta\in \mathrm{Spec} A$ be the closed point. 
1.Given $f:\mathrm{Spec} A\to X$ a morphism, we set $x=f(\eta)$, then local homomorphism $f_{\eta}^{\#}:O_x\to A_m=A$ induces a $k-$morphism of residues fields $k(x)\to k$, hence an isomorphism. So, $x$ is a rational point. And $f_{\eta}^{\#}$ induces $m_x/m_x^2\to m/m^2=k$, which is an element of $T_x$.
2.Conversely, let $j:k\to O_x$ and $\phi:O_x\to O_x/m_x$ be the natural maps. As $x\in X$ is rational, $\phi j$ is an isomorphism with the inverse $\Phi:O_x/m_x\to k$. Now given $\psi:m_x/m_x^2\to k$ an element of $T_x$, we define a ring morphism $O_x\to A,h\mapsto \Phi\phi(h)+\psi(h-j\Phi\phi(a))\epsilon$, and this gives us $\mathrm{Spec} A\to \mathrm{Spec} O_x$. There's a natural morphism $\mathrm{Spec} O_x\to X$, thus by composition we get $\mathrm{Spec} A\to X$.
