In this text book, it was mentioned that we generally use the term coefficient in two ways
1) The numerical coefficient of a term in an algebraic expression
2) A variable as a coefficient for rest of the term
But didn't comment anything on splitting exponent on a variable.
Example: Let $5x^2+9xy$ be the algebraic expression under consideration
then it is clear for me that 5 is coefficient for the term $5x^2$ as well as $x^2$
$9$ is the coefficient for the term $9xy$ as well as $xy$
$x$ is the coefficient for $9y$ and $y$ is the coefficient for $9x$ in the term $9xy$.
But confused on whether I can call $x$ as the coefficient of $5x$ in the term $5x^2$ or not because the textbook didn't provide any example like this.
It would depend on what term you're considering the main variable. If you only have one variable, you can't call the main variable a coefficient - but it is a factor of the original. That is, $5x$ is not the coefficient of $5x^2$, but it is a factor (the other being just plain $x$).
If you have more than one variable and you're considering the second variable as a constant, then you'd be able the numerical and constant variable as the coefficient.
For example, if we have $5xy^2$ and $y$ is the main variable and $x$ is a constant, then indeed $5x$ can be considered the coefficient. If $x$ is the main variable and $y$ is a constant, $5y^2$ can be considered the coefficient.