Why "A line integral of a scalar field is thus a line integral of a vector field where the vectors are always tangential to the line"?

A line integral of a scalar field $g $ is $\displaystyle\int g\left(\overrightarrow{r}(t)\right)\left|\overrightarrow{r}'(t)\right|\,\mathrm dt$ along the curve. A line integral of a vector field $\overrightarrow{F}$ is $\displaystyle\int \overrightarrow{F}\left(\overrightarrow{r}(t)\right)\bullet\overrightarrow{r}'(t)\,\mathrm dt$. By a property of dot products, this equals $\displaystyle\int \left|\overrightarrow{F}\left(\overrightarrow{r}(t)\right)\right|\left|\overrightarrow{r}'(t)\right|\cos\left(\theta (t)\right)\,\mathrm dt$, where $\theta (t) $ is the angle between $ \overrightarrow{F}\left(\overrightarrow{r}(t)\right)$ (the direction of the vector field) and $\overrightarrow{r}'(t)$ (the direction of the curve).

If we choose $$\overrightarrow{F}\left(\overrightarrow{r}(t)\right)=g\left(\overrightarrow{r}(t)\right)*\frac{\overrightarrow{r}'(t)}{\left|\overrightarrow{r}'(t)\right|}\text{,}$$ then $\overrightarrow{F}$ has magnitude $|g|$ and direction: either the same as $\overrightarrow{r}'(t)$ or directly opposite (precisely when $g <0$). These directions make $\cos\left(\theta (t)\right) = \pm 1$ according to the sign of $g $. This way, $\left|\overrightarrow{F}\left(\overrightarrow{r}(t)\right)\right|\left|\overrightarrow{r}'(t)\right|\cos\left(\theta (t)\right)=g\left(\overrightarrow{r}(t)\right)\left|\overrightarrow{r}'(t)\right|$, so the vector field integral becomes the scalar field integral.

In summary, by choosing $\overrightarrow{F}$ so that it goes in the same direction of the curve (up to a minus sign), we can make a vector field integral that equals the scalar field integral.

If $\vec{F}= \pmatrix{P\\Q}$ is your vector field, then: $$ \underbrace{\int_C \vec{F} \cdot d\vec{r}}_{\text{vector field line integral}} = \int_C \pmatrix{P\\Q}\cdot \pmatrix{dx\\dy} = \int_C P\; dx + Q\; dy = \underbrace{\int_C P\; dx}_{\text{scalar field line integral}} +\underbrace{\int_C Q\; dy}_{\text{scalar field line integral}} $$

So in other words, your initial vector field line integral is the sum of two scalar field line integrals, in the direction of the $x$ and $y$ axes, respectively.

Note that if $\vec{r}(t)$ is a parametrization of $C$, you can define the line integral of a vector field as follows: $$ \int_C \vec{F} \cdot d\vec{r} = \int_C \vec{F} \cdot\vec{T}\; ds = \int_t \vec{F}(\vec{r}(t)) \cdot\frac{\vec{r}'(t)}{\mid \mid \vec{r}'(t) \mid \mid}\;\mid \mid \vec{r}'(t) \mid \mid dt = \int_t \vec{F}(\vec{r}(t)) \cdot \vec{r}'(t)\; dt $$ The last integral is also a scalar field integral.