The equation to be solved is $9^x + 2(1-a) 3^x + a = 0$. We have to find all integral values of $a$ between $1$ and $30$ for which the above equation has roots of opposite sign.
I substituted $3^x = t$ and got the equation $ t^2 + 2(1-a)t + a= 0$. Applied Discriminant $\ge 0$. But I could not get any solution.
Your substitution is good. Now you can apply the quadratic formula to solve for $t$ (in terms of $a$, of course). As noted in the comments above, you want your two values for $t$ to be both positive, one on the interval $(0,1)$, and the other on $(1,\infty)$.
I'm getting a discriminant: $4(a^2-3a+1)$, or $4((a-\frac32)^2-\frac54)$, which is negative for $a=1,2$, so we only really need to consider values of $a$ from $3$ to $30$.
The solutions for $t$ are $a-1 \pm \sqrt{a^2-3a+1}$. When $a=3$, one of these solutions is $1$, implying a root of $x=0$, which is not desired. For $a>3$ the radical satisfies the inequality:
$$a-2 < \sqrt{a^2-3a+1} < a-1.$$
That puts the difference obtained when choosing the minus sign between $0$ and $1$, as desired. Thus, all values from $a=4$ to $a=30$ should work.