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.