Pls discuss just the method below, and refrain from other methods. The alternate solution below looks wrong to me, because both the exponent and base are $x$! So how can you possibly pretend or playact that they're not, and treat the exponent and base separately as constants?
I once asked students to find the derivative of $x^x$ (with respect to $x$). One student figured that if the exponent were a constant then the answer would be $xx^{x-1}$ which is to say $x^x$, while if the base were constant the answer would be $x^x\log x$, so she added the two together to get $x^x+x^x\log x$. I was just about to mark the answer as wrong, when I realized that she had arrived at the correct answer – and, later, realized that it wasn't a coincidence, her unorthodox method actually works in a more general setting.