Solution (source code)

= Solution

Put $u=\ln(1+x)=x-x^2/2+x^3/3+O(x^4)$. Since $u=O(x)$, the outer <Taylor series> requires $u^2=x^2-x^3+O(x^4)$ and $u^3=x^3+O(x^4)$. Therefore
$$
\begin{aligned}
\ln(1+\ln(1+x))&=u-\frac{u^2}{2}+\frac{u^3}{3}+O(u^4)\\
&=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac12(x^2-x^3)+\frac{x^3}{3}+O(x^4)\\
&=\boxed{x-x^2+\frac{7x^3}{6}+O(x^4).}
\end{aligned}
$$
Both <logarithms> are defined on a neighbourhood of zero, so this composition of <power series> is valid there.