Consider a line integral $$\int_{(x_1,y_1)}^{(x_2,y_2)}ds$$
evaluated along the straight line joining $(x_1,y_1)$ to $(x_2,y_2)$.
We know that $$\int_{x_1}^{x_2} dx =x_2-x_1=-\int_{x_2}^{x_1}dx \tag{0}$$
Based on the above equation, am I correct to expect the following $$\int_{(x_1,y_1)}^{(x_2,y_2)}ds = -\int_{(x_2,y_2)}^{(x_1,y_1)}ds \tag{1}$$
I've tried proving along the lines indicated at Khan Academy, but I can't seem to get the negative sign in the above equation. I've tried the following change of variables for the LHS of the equation above
$$ x = \frac{x_2+x_1}{2} + \frac{x_2-x_1}{2}t \quad y = \frac{y_2+y_1}{2} + \frac{y_2-y_1}{2}t$$ Therefore, $$ ds = \sqrt{\Big(\frac{dx}{dt}\Big)^2 + \Big(\frac{dy}{dt}\Big)^2}dt = \frac{1}{2}\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}dt = \frac{l}{2}dt$$
Where $$ l = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$$
So,
$$\int_{(x_1,y_1)}^{(x_2,y_2)}ds = \int_{-1}^{1}\frac{l}{2}dt = l \tag{2}$$
If we make the analogous change of variables on the RHS of $(1)$ i.e.
$$ x = \frac{x_1+x_2}{2} + \frac{x_1-x_2}{2}t \quad y = \frac{y_1+y_2}{2} + \frac{y_1-y_2}{2}t$$
Therefore, we get
$$ -\int_{(x_2,y_2)}^{(x_1,y_1)}ds = -\int_{-1}^{1} \frac{l}{2} dt = -l \tag{3}$$
So, either $(1)$ is not true or I've made a sign error somewhere. I'd be very grateful if someone points out my mistake (most likely a mistake in choosing the sign of the square root in the formula $ds = \sqrt{\Big(\frac{dx}{dt}\Big)^2 + \Big(\frac{dy}{dt}\Big)^2}dt$)
The simple answer is that the arc length of a curve can never be negative (cf. Can arc length be negative?). Your line integral calculates exactly this quantity (and it should be clear that the arc length of a curve does not depend on its orientation).
Your conclusion that (1) is not true is correct. It can generally be shown that scalar line integrals are independent of orientation. For vector-valued functions, however, you would obtain a minus sign.
A similar problem is explained in this question: A misunderstanding on the independence of orientation of line integrals?