Solution 1:

What if you represented your function as

$f(x) = x^{x^x} = \exp(x^x \cdot \ln x) = \exp(\,\exp(x\ln(x)) \cdot \ln x \, )$

Then you can apply the chain rule with the product rule.

Solution 2:

It's $z=x^y$ not $z = y^x$ so $z= y\ln x$ not $z = x\ln y$