How to find the amount of moles given mass percentage data
Basis: 100 g
$m_{\ce{Al}}=8.10\ \mathrm g$
 $n_{\ce{Al}}=\frac{8.10\ \mathrm g}{27\ \mathrm{g/mol}}=0.3\ \mathrm{mol}$
 $n_{\ce{Al2(SO4)3}}=0.5 \times n_{\ce{Al}}=0.15\ \mathrm{mol}$
 $m_{\ce{Al2(SO4)3}}=0.15\ \mathrm{mol} \times 342.15\ \mathrm{g/mol}=51.3\ \mathrm g$
$m_{\ce{H2O}}=100\ \mathrm g-51.3\ \mathrm g=48.65\ \mathrm g$
$n_{\ce{H2O}}=\frac{48.65\ \mathrm g}{18\ \mathrm{g/mol}}=2.7\ \mathrm{mol}$
$x=\frac{2.7\ \mathrm{mol}}{0.15\ \mathrm{mol}}=18$