All solutions here are SUGGESTED. Mr. Teng will hold no liability for any errors. Comments are entirely personal opinions.

(i)
let the length of side of base be $y$.

$y = a - 2\frac{x}{tan{\frac{\pi}{6}}}$

$= a - \frac{2}{\frac{1}{\sqrt{3}}}$

$= a - 2x\sqrt{3}$

Required Volume, V $= \frac{1}{2} (a - 2x \sqrt{3})^{2} \text{sin}(\frac{\pi}{3}) x$

$= \frac{x\sqrt{3}}{4}(a - 2x \sqrt{3})^{2}$

(ii)
$\frac{dV}{dx} = \frac{\sqrt{3}}{4} (a - 2x \sqrt{3})^{2} -3x (a - 2x \sqrt{3})$

For maximum volume, $\frac{dV}{dx} = 0$

$\sqrt{3} (a - 2x \sqrt{3})^{2} -12x (a - 2x \sqrt{3}) = 0$

$(a - 2x \sqrt{3}) [\sqrt{3} (a - 2x \sqrt{3}) -12x] = 0$

$(a - 2x \sqrt{3}) = 0 ~\mathrm{or}~ a - 2x \sqrt{3}- 4x \sqrt{3} = 0$

$x = \frac{a}{2 \sqrt{3}}) ~\mathrm{or}~ a - 6x\sqrt{3} = 0$

$x = \frac{a}{2 \sqrt{3}} ~\mathrm{or}~ x = \frac{a}{6\sqrt{3}}$

$\frac{d^{2}V}{dx^{2}} = -3 (a - 2x \sqrt{3}) - 3 (a - 2x \sqrt{3}) + 6 \sqrt{3}x$

$\frac{d^{2}V}{dx^{2}} = -6a + 12x \sqrt{3} + 6\sqrt{3}x = -6a + 18x \sqrt{3}$

When, $x = \frac{a}{2 \sqrt{3}},~~ \frac{d^{2}V}{dx^{2}} = -6a + 18(\frac{a}{2 \sqrt{3}})\sqrt{3} = 3a > 0$

When, $x = \frac{a}{6 \sqrt{3}},~~ \frac{d^{2}V}{dx^{2}} = -6a + 18(\frac{a}{6 \sqrt{3}})\sqrt{3} = -3a < 0$ Thus, Volume is maximum when $x = \frac{a}{6 \sqrt{3}}$ $\therefore, \mathrm{maximum~volume} = \frac{a^{3}}{54}$