Simplify $x^\frac{1}{(\log_a x)}$ Simplify $x^\frac{1}{(\log_a x)}$
The solution in my textbook is the following:

Since $\log_a (x^\frac{1}{(\log_a x)}) = \frac{1}{\log_a x}$ $\log_a x
 = 1$,
therefore $x^\frac{1}{(\log_a x)} = a^1 = a.$

I understand the law used in the first line is $\log_a (x^y) = y \log_a x$. I also understand that $\log_a x$ multiplied by it's reciprocal equals to 1. However, I do not understand why it makes sense to take the $\log_a$ of our expression in the first place and neither do I understand how the conclusion in the first line helps us arrive at the conclusion in the second line that $x^\frac{1}{(\log_a x)} = a^1 = a.$

For the second question, note that is the definition of logarithm:$$\log_a (x)$$ is that number $y$ such that $a^y = x$. Since you have shown that $\log_a(x^{1/\log_a(x)}) = 1$, this means that $a$ raised to the power of the RHS equals the term you are taking the $\log_a$ of. In other words, this means $$x^{1/\log_a(x)} = a^1 = a.$$

The first question is actually very good. Nothing is specified about the values of $a$ and $x$, which is a bit problematic. Here is how I would analyse when it makes sense to apply $\log_a$ to the initial expression:
Since we have a term of the form $\log_a(x)$ in $x^{1/\log_a(x)}$, it means that $a \in (0,\infty)$ and $a \neq 1$. Moreover $x > 0$ because that is the domain of $\log_a$. Since $\log_a(x)$ appears in the denominator of a fraction, it cannot equal zero, so $x \neq 1$ as well.
Secondly, since we have an expression of the form "$x$ raised to an exponent", we must have $x > 0$, but that does not give any new information. 
Lastly, to take $\log_a$ of an expression, that expression must have positive value. And, since $x > 0$, $x$ raised to any exponent is positive, so it makes sense to talk about
$$
\log_a(x^{1/\log_a(x)})
$$
whenever $a,x \in (0,\infty) \setminus \{ 1 \}$.

It is good practice to check, as done above, that the objects you are dealing with are well-defined.
