f(a+2)=3^(a+2)=18
3^a=2
g(x)=3^ax-4^x=2^x-(2^x)²-1/4+1/4
=-(2^x-1/2)²+1/4
∵0≤x≤1
1≤2^x≤2
∴g(x)在[0,1]上单调递减
1/2≤2^x-1/2≤3/2
∴-2≤g(x)≤0
∴g(x)的值域为[-2,0]
f(a+2)=3^(a+2)=18
3^a=2
g(x)=3^ax-4^x=2^x-(2^x)²-1/4+1/4
=-(2^x-1/2)²+1/4
∵0≤x≤1
1≤2^x≤2
∴g(x)在[0,1]上单调递减
1/2≤2^x-1/2≤3/2
∴-2≤g(x)≤0
∴g(x)的值域为[-2,0]