According to Hartshorne's book a sheafification is:

I saw a different definition elsewhere
Definition 2
Given a presheaf $\mathcal F$ in a topological space $X$ we can associate a $\mathcal F$ a sheaf called $\mathcal F^+$:
$\mathcal F^+(U):=\{t\in D_{\mathcal F}(U);t_x\in Im((\varphi_{\mathcal F})_x),\forall x \in U\}$.
What I'm trying to understand is why saying the sheaf he constructs with (1) and (2) in the Hartshorne's proof is equivalent to the sheaf of the definition 2.
My attempt to solve this question
$\varphi_{\mathcal F}$ is defined as $\varphi_{\mathcal F}:\mathcal F\to D_{\mathcal F}$ and when we apply an open subset $U$, we have $\varphi_{\mathcal F}(U):\mathcal F(U)\to D_{\mathcal F}(U)$, where $D_{\mathcal F}(U)=\prod_{x\in U} \mathcal F_x$ and we know that $t_x\in Im((\varphi_{\mathcal F})_x),\forall x \in U\Leftrightarrow t\in Im((\varphi_{\mathcal F}))$
Since the image of $\varphi_{\mathcal F}$ is an element of $\prod_{x\in U} \mathcal F_x$ the part (1) is ok, since these functions $s$ can be regarded as elements of $\prod_{x\in U} \mathcal F_x$ because of (1). (see definition of products as functions).
I'm having troubles to prove that the sheaf of the definition 2 has as a property the part 2 in the Hartshorne's proof and vice-versa.
Thanks
Hartshorne's (2) corresponds to your $t_x \in \def\Im{\mathop{\rm Im}}\Im(\phi_{\mathcal F})_x$, all $x \in U$. To see this, let $x \in U$. Then $t_x \in \Im(\phi_{\mathcal F})_x$, that is, there is an open $V \ni x$ and a $s \in \mathcal F(V)$ such that $t_x = s_x \in \mathcal F_x$. This gives us - by definition of the stalk - an open $W \subseteq U \cap V$ containg $x%$ with $t|_W = s|_W$. So $s_y = t_y$ for all $y \in W$ and (2) is fulfilled.
On the other hand, suppose (2) holds, then given $x \in U$ and $t \in D_{\mathcal F}(U)$, choose $s \in \mathcal F(V)$ with $x\in V \subseteq U$ and $t|_V = s|_V$. Then $t_x = s_x \in \Im(\phi_{\mathcal F})_x$.