Use the identity,
[tex]\cos(90^\circ-x)=\sin x\implies \sin(x+18^\circ)=\cos(90^\circ-(x+18^\circ))=\cos(72^\circ-x)[/tex]
This lets us write
[tex]\cos(3x)=\cos(72^\circ-x)[/tex]
and we can take the inverse cosine of both sides to get
[tex]3x=72^\circ-x+360^\circ n\text{ OR }3x=x-72^\circ+360^\circ n[/tex]
where [tex]n[/tex] is any integer.
Solving for [tex]x[/tex] gives
[tex]x=18^\circ+90^\circ n\text{ OR }x=-36^\circ+180^\circ n[/tex]