We know period of $\cos 4 x=\frac{2 \pi}{4}=\frac{\pi}{2}$
and period of $\tan 3 x=\frac{\pi}{3}$
$\therefore $ Period of $f(x)=\operatorname{LCM}\left(\frac{\pi}{2}, \frac{\pi}{3}\right)$
$=\frac{\operatorname{LCM}(\pi, \pi)}{\operatorname{HCF}(2,3)}=\pi$