I think the right term explodes, and so does the left (because $x\to -2$, the denominator goes to $0$ but the numerator does not). The decomposition performed is therefore incorrect. However,
The key idea is that $-\sin(\pi+x)= \sin x$ for any $x$. This is fairly obvious to prove from the addition formula.
In particular, we have :
$$
\sin\left(\frac{\pi x}{2}\right) = -\sin\left(\frac{\pi x}{2} + \pi\right) = - \sin\left(\frac{\pi (x+2)}{2}\right)
$$
Now, the advantage we have is that we can make use of the $\sin x \over x$ rule, after a change of variable. Indeed, we have :
$$
\frac{x+2}{\sin(\frac{\pi x}{2})} = -\frac{x+2}{\sin\left(\frac{\pi(x+2)}2\right)} = -\frac{2}{\pi} \frac{\frac{\pi(x+2)}{2}}{\sin \left(\frac{\pi(x+2)}{2}\right)}
$$
Let $y = \frac{\pi(x+2)}{2}$. Then, as $x \to -2$ we have $y \to 0$. In particular, $$
\lim_{x \to -2} \frac{x+2}{\sin(\frac{\pi x}{2})} = \lim_{y \to 0} -\frac 2{\pi} \frac{y}{\sin(y)} = \boxed{-\frac{2}{\pi}}
$$
and this can easily be verified from Wolfram Alpha as well.
Note : Thanks to @lalala below. They mention that $\lim_{y\to 0}\frac{y}{\sin y} = 1$ can be proven through L'Hopital. However, we can do better, and that's why this is a standard result.
I would suggest looking at this page for a geometric proof of the inequality $1 < \frac{y}{\sin y} < \frac 1{\cos y}$ for all $y \in (\frac{-\pi }{2} , \frac \pi 2)$(For $y$ negative note that $\sin y = -\sin (-y)$ has the same sign as $y$ so they cancel out). Then the squeeze theorem applies as $y \to 0$ to conclude.
Best Answer
We have :\begin{aligned}\lim_{x\to 0}{\frac{a^{\tan{x}}-a^{\sin{x}}}{\tan{x}-\sin{x}}}&=\lim_{x\to 0}{a^{\sin{x}}\frac{a^{\tan{x}-\sin{x}}-1}{\tan{x}-\sin{x}}}\\ &=a^{0}\times \ln{a}\\ &=\ln{a}\end{aligned}
Because $ \lim\limits_{x\to 0}{\frac{a^{\tan{x}-\sin{x}}-1}{\tan{x}-\sin{x}}}=\lim\limits_{y\to 0}{\frac{a^{y}-1}{y}}=\ln{a} $ as you said.