The total power in an AM signal when the carrier power and the percentage of modulation are known is $P_T = P_c \big ( 1 + \large\frac{m^2}{2}$$\big )$

$\Rightarrow 40 = P_c \big ( 1 + \large\frac{0.30^2}{2}$$\big )$

$\Rightarrow P_c = \large\frac{40}{1.045}$$ = 38.28\;W$

The total power in both side bands $ = 40-38.28 = 1.72\;W$

The power in each side band is half of this $ = 0.86\;W$

$\Rightarrow$ The fraction of the power in the carrier is $\large\frac{38.28}{40} $$\approx 0.96$