Why are the red parts of this expression present $\int_a^b \sqrt{g_{cd}\frac{dx^c}{\color{red}{d\lambda}}\frac{dx^d}{\color{red}{d\lambda}}}d\lambda$? I am now trying to teach myself about geodesics, and a passage of my notes reads:

In this chapter geodesics have been introduced as generalizations of straight lines through
$$\frac{Du^a}{ds}=0$$
Here two alternative characterizations of geodesics are considered.
$(\mathrm{a})$ Consider a curve $C$ joining two fixed points $x_A$ and $x_B$. This can be defined through $x^a=x^a(\lambda)$, where $\lambda \in [a, b]$ is a parameter. The length of the curve can be expressed as an integral
$$L=\int_a^b \sqrt{g_{cd}\frac{dx^c}{\color{red}{d\lambda}}\frac{dx^d}{\color{red}{d\lambda}}}d\lambda\tag{?}$$
Geodesics may be deﬁned as curves that minimise (or maximise) $L$ for ﬁxed end points $x_A$ and $x_B$. The integral is awkward to work with due to the parametrisation ambiguity of the integral.

The second method, $(\mathrm{b})$ is no interest to what I have to ask here. The simple question I have is why are there the red parts in denominators of $(\mathrm{?})$. In other words, I think those denominators should be unity, $d\lambda=1$. I say this because from the equation for the differential line segment (squared):
$$ds^2=g_{cd} dx^c dx^d\tag{A}$$
Since the action, $$L=\int_{a}^{b} ds = \int_{a}^{b}\sqrt{g_{cd}dx^cdx^d}d\lambda\tag{B}$$ I think the notes are wrong and $(\mathrm{?})$ should actually be $$\int_{a}^{b}\sqrt{g_{cd}dx^cdx^d}d\lambda$$
I thought the above would be enough to convince others that this is all just another typo and I have the right expression, but sadly, I came across these handwritten notes, which I will embed as an image below:
Seeing this only makes me believe that I am the one making the mistake and that $(\mathrm{?})$ truly is correct.
So, how can $(\mathrm{?})$ possibly be correct when it is simply derived from taking the square root of $(\mathrm{A})$ [as in $(\mathrm{B})$]?
 A: Carrying your reasoning forward, since $ds^2=g_{cd}dx^cdx^d$, we'll get
$$
\int_a^b ds=\int_a^b \sqrt{g_{cd}dx^c dx^d}
=\int_a^b \sqrt{g_{cd}\frac{dx^c}{d\lambda}\frac{dx^d}{d\lambda}}d\lambda.
$$
A: There's a serious problem already in the first half of Equation (B):
$$ L \stackrel?= \int_a^b ds. $$
Strictly speaking, this integral that you wrote in the middle of Equation (B) is a simple single-variable integral that runs from $s=a$ to $s=b$ (that's what your notation means), evaluating to
$$ \int_a^b ds = b - a. $$
Surely that is not what you wanted to write. You want an integral where there's a variable $\lambda$ that goes from $\lambda = a$ to $\lambda = b.$
You might write that integral like this:
$$ L = \int_a^b \frac{ds}{d\lambda}\, d\lambda. $$
You also say that $ds^2=g_{cd}dx^cdx^d,$
which you later use to justify the substitution
$ds = \sqrt{g_{cd}dx^cdx^d}.$
That might be fine and well in the proper context, but in getting from
$\int_a^b \frac{ds}{d\lambda}\, d\lambda$ to
$\int_a^b \fbox{something else}\, d\lambda$
you need to replace $\frac{ds}{d\lambda},$ not just $ds.$
But if you accept that $ds^2 = g_{cd} dx^c dx^d$ you should also accept that
$$ \left(\frac{ds}{d\lambda}\right)^2
 = g_{cd} \frac{dx^c}{d\lambda}\frac{dx^d}{d\lambda}. $$
Now take the square root on both sides, substitute for $\frac{ds}{d\lambda}$
in $L = \int_a^b \frac{ds}{d\lambda}\, d\lambda,$
and you have the equation in your notes.
