Consider this equation:
$$x^{t-1}e^{-x} = a$$
I am aware that this is what you integrate from $0$ to $\infty$ in respect to $x$ to get the Gamma Function, but I do not want to worry about it here. I want to solve this for $x$, but you can see that it is both the base of an exponent and an exponent itself. I have a feeling I will need to use the Lambert W Function.
As surmised, the Lambert W is indeed the way to go. To that end, we have
$$x^{t-1}e^{-x}=a\implies xe^{-x/(t-1)}=a^{1/(t-1)}\implies \frac{-x}{t-1}e^{-x/(t-1)}=\frac{-a^{1/(t-1)}}{t-1}$$
Inasmuch as the $W$ function is defined by $z=W(z)e^{W(z)}$, we see immediately that
$$\bbox[5px,border:2px solid #C0A000]{x=-(t-1)W\left(\frac{-a^{1/(t-1)}}{t-1}\right)}$$