You mixed up power and voltage gains. As per the question Power amplification is:
$$ 10 log (P_o/P_i) = 30 dB $$ Since P is proportional to \$ V^2 \$ , we can also write: $$ 10 log (V_o^2/V_i^2) = 30 dB$$ Or $$ 20 log (V_o/V_i) = 30 dB$$ $$ i.e., log (V_o/V_i) = 1.5 dB$$ Therefore the corresponding voltage amplification is: $$ (V_o/V_i) = 10^{1.5} = 31.62$$