$A = \begin{pmatrix} \sin \frac{\pi}{18} & -\sin \frac{4\pi}{9} \\ \sin \frac{4\pi}{9}& \sin \frac{\pi}{18} \end{pmatrix}$ $= \begin{pmatrix} \sin 10^{\circ} & -\sin 80^{\circ} \\ \sin 80^{\circ} & \sin 10^{\circ} \end{pmatrix}$ $= \begin{pmatrix} \sin (90^{\circ}-80^{\circ}) & -\sin 80^{\circ} \\ \sin 80^{\circ} & \sin (90^{\circ}-80^{\circ}) \end{pmatrix}$
$A= \begin{pmatrix} \cos 80^{\circ} & -\sin 80^{\circ} \\ \sin 80^{\circ} & \cos 80^{\circ} \end{pmatrix}$
Here, note that $A$ is a rotation matrix with $\theta = 80^{\circ}$.
If we have $2$ rotation matrices $A(\theta)$ and $A(\phi)$ then multiplication of these $2$ matrices will be $A(\theta + \phi)$ means corresponding angles will be added in the multiplication of these 2 matrices.
So, if we have a rotation matrix $A(\theta)= \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}$ then $A^n(\theta)= \begin{pmatrix} \cos n\theta & -\sin n\theta \\ \sin n\theta & \cos n\theta \end{pmatrix}$
It can be proved using induction on $n.$
So, in this question,
$A^n= \begin{pmatrix} \cos n*80^{\circ} & -\sin n*80^{\circ} \\ \sin n*80^{\circ} & \cos n*80^{\circ} \end{pmatrix} = I$
Assuming, set of natural numbers starts from $1$ and for smallest integer value of $n \in \mathbb{N}$
$n*80^{\circ} = 4*180^{\circ} \Rightarrow n= 9$