The quantity in line $2$ is positive.
What is $\vec E \cdot d\vec s$?
It is $E \hat r \cdot dr \hat r = E \, dr$ where $E$ and $dr$ are components in the $\hat r$ direction
What does $dr$ mean?
It is $\Delta r = r_{\rm final} - r_{\rm initial}$ making that interval smaller and smaller.
How does one decide on the values of $r_{\rm final}$ and $r_{\rm initial}$?
They are shown by the limits of integration so in this case consider a small but finite displacement $\Delta r$ which is equivalent to writing $\displaystyle \int ^{r_{\rm final}} _{r_{\rm initial}} E \,\Delta r = E\, (r_{\rm final} - r_{\rm initial})$
$\vec E = \dfrac {Q_2}{r^2} \hat i$ so $E = +\dfrac {Q_2}{r^2}$ ie it is a quantity whose sign depends on the sign of $Q_2$.
Note that there is nothing to say whether the displacement is towards or away from the charge $Q_2$ until one decides on the values of $r_{\rm final}$ and $r_{\rm initial}$.
If $r_{\rm final} < r_{\rm initial}$ then $\displaystyle \int ^{r_{\rm final}} _{r_{\rm initial}} E \,\Delta r = E\, (r_{\rm final} - r_{\rm initial})$ is negative.
The quantity $\displaystyle \int ^{r_{\rm final}} _{r_{\rm initial}} E \,\Delta r$ is the work done by the electric field and as the change in potential is define as minus the work done by the electric field the quantity on the right hand side of line $2$ is positive.