For a straightforward solution to this specific question, you have a good start: since indeed $\displaystyle \tan\frac{2\pi}{3}=-\sqrt{3}$, the expression at hand now takes the form $\displaystyle \arctan\left(\tan\frac{2\pi}{3}\right)=\arctan\left(-\sqrt{3}\right)$. Now you need to recall the (standard) definition of the arctangent function:
$\arctan a=\varphi$ means that $\tan\varphi=a$ and $\displaystyle \varphi\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$.
That's why $\displaystyle \frac{2\pi}{3}$ itself cannot be the answer: it's outside the range of the arctangent function. You need to find an angle within this range whose tangent is also $-\sqrt{3}$. Since $\displaystyle \tan\left(-\frac{\pi}{3}\right)=-\sqrt{3}$ and $\displaystyle -\frac{\pi}{3}\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$, the final answer is
$$\arctan\left(\tan\frac{2\pi}{3}\right)=\arctan\left(-\sqrt{3}\right)=-\frac{\pi}{3}.$$
For an arbitrary angle $\theta$, for the same reason $\arctan(\tan\theta)\neq\theta$ in general; this is only true if $\displaystyle \theta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$. To find the value of $\arctan(\tan\theta)$ for any other $\theta$ you'll need to do something similar to find an appropriate angle within the range of arctangent. The concept of reference angles can help with that.