Let's see if I can do something similar to Jack's answer for the second one. I'm not Ramanujan, but I have Maple.
$\sec(2\pi/9), \sec(4\pi/9), \sec(8\pi/9)$ are roots of $t^3 - 6 t^2 + 8$.
If $\alpha$, $\beta$, $\gamma$ are cube roots of these, $\alpha^{1/3} + \beta^{1/3} + \gamma^{1/3}$ will satisfy the following polynomial:
factor(evala(Norm(add(RootOf(_Z^3-RootOf(t^3-6*t^2+8,t,index=i)),i=1..3)-z)));
$$- \left( {z}^{18}-72\,{z}^{15}+2484\,{z}^{12}-19008\,{z}^{9}+31104\,{z
}^{6}+46656\,{z}^{3}+46656 \right) ^{6} \left( {z}^{9}+18\,{z}^{6}+108
\,{z}^{3}-1728 \right) ^{6}{z}^{18} \left( {z}^{9}-162\,{z}^{6}+157464
\right) \left( {z}^{18}+972\,{z}^{12}+69984\,{z}^{6}+1259712
\right) ^{3} \left( {z}^{27}-162\,{z}^{24}+9612\,{z}^{21}-480384\,{z}
^{18}+16275168\,{z}^{15}-460269216\,{z}^{12}+7616887488\,{z}^{9}-
85571676288\,{z}^{6}+116784820224\,{z}^{3}+1833767424 \right) ^{3}
\left( {z}^{27}-162\,{z}^{24}+9612\,{z}^{21}-141696\,{z}^{18}-2667168
\,{z}^{15}-131935392\,{z}^{12}+687911616\,{z}^{9}+28348838784\,{z}^{6}
+193536552960\,{z}^{3}+145199817216 \right) ^{3} \left( {z}^{27}-108\,
{z}^{21}-6048\,{z}^{18}-54432\,{z}^{15}-54432\,{z}^{12}-451008\,{z}^{9
}+1399680\,{z}^{6}-559872\,{z}^{3}-373248 \right) ^{6} \left( {z}^{27}
-108\,{z}^{21}+6048\,{z}^{18}-54432\,{z}^{15}+54432\,{z}^{12}-451008\,
{z}^{9}-1399680\,{z}^{6}-559872\,{z}^{3}+373248 \right) ^{6}
$$
The factor that is $0$ for the sum of the real cube roots is
$$ z^9+18 z^6+108 z^3-1728$$
and the real root of that is $\sqrt[3]{-6 + 6 \sqrt[3]{9}}$.
I don't see how you could go in the reverse direction, starting with
$\sqrt[3]{-6 + 6 \sqrt[3]{9}}$ and finding a representation for it (and I doubt that Ramanujan did it that way either).
EDIT: In the same vein:
$$ \cos\left(\frac{2\pi}{9}\right)^{1/3} + \cos\left(\frac{4\pi}{9}\right)^{1/3} + \cos\left(\frac{8\pi}{9}\right)^{1/3} = \frac{\sqrt [3]{-24+12\,\sqrt[3]{9}}}{2}$$