Consider the following context and definition from the sub-section 7.8.1 Area function of the chapter Integrals from the NCERT textbook
We have defined $\int_{a}^{b} f(x) dx$ as the area of the region bounded by the curve $y = f(x)$, the ordinates $x = a$ and $x = b$ and $x$-axis. Let $x$ be a given point in $[a, b]$. Then $\int_{a}^{x} f(x) dx$ represents the area of the light shaded region $$\cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots$$
In other words, the area of this shaded region is a function of $x$. We denote this function of $x$ by $A(x)$. We call the function $A(x)$ as Area function and is given by
$$A(x) = \int_{a}^{x} f(x) dx$$
I am confused with the usage of the same variable $x$ for both the variable of integration and for the independent variable of the function.
It is given that $x \in [a, b]$ and variable of integration is a dummy variable. So, I think, we can write area function as
$$A(x) = \int_{a}^{x} f(t) dt$$
Am I correct? Is the usage of the same variable $x$ just a choice of writing or am I going wrong somewhere?
Although confusing, it is not ambiguous.
The variable $x$ inside the expression of the integration, $$f\left(x\right)dx$$ refers only to the variable of integration running between the integration bounds. It is within the scope of the expression for integration.
Any variable $x$ outside that expression, including the bounds of the integration $$\int^x_a$$ is not part of the variable of integration, since the integration variable can only exist inside the expression, not anywhere else, which is outside the scope of integration expression.
So technically, by definition, the original formula is correct. Now whether to re-write it to reduce the confusion, that's up to the author, but the author is still correct.