That is, $A$ is in the second quadrant and $B$ is in the first quadrant.
We know that in the second quadrant, sine function is positive and cosine and tan functions are negative In the first quadrant, all $\mathrm{T}$ - functions are positive.
Therefore,
$\cos A=-\sqrt{1-\sin ^{2} A}=-\sqrt{1-\left(\frac{1}{2}\right)^{2}}=-\sqrt{1-\frac{1}{4}}=-\sqrt{\frac{3}{4}}=\frac{-\sqrt{3}}{2}$
$\tan A=\frac{\sin A}{\cos A}=\frac{1 / 2}{-\sqrt{3} / 2}=\frac{-1}{\sqrt{3}}$
$\sin B=\sqrt{1-\cos ^{2} A}=\sqrt{1-\left(\frac{\sqrt{3}}{2}\right)^{2}}=\sqrt{1-\frac{3}{4}}=\sqrt{\frac{1}{4}}=\frac{1}{2}$
$\tan B=\frac{\sin B}{\cos B}=\frac{1 / 2}{\sqrt{3} / 2}=\frac{1}{\sqrt{3}}$
Now,
(i) $\tan (A+B)=\frac{\tan A+\tan B}{1-\tan A \tan B}$
$=\frac{\frac{-1}{\sqrt{3}}+\frac{1}{\sqrt{3}}}{1-\frac{-1}{\sqrt{3}} \times \frac{1}{\sqrt{3}}}$
$=\frac{0}{1+\frac{1}{3}}=0$
(ii) $\tan (A-B)=\frac{\tan A-\tan B}{1+\tan A \tan B}$
$=\frac{\frac{-1}{\sqrt{3}}-\frac{1}{\sqrt{3}}}{1+\frac{-1}{\sqrt{3}} \times \frac{1}{\sqrt{3}}}$
$=\frac{\frac{-2}{\sqrt{3}}}{1-\frac{1}{3}}$
$=\frac{-2 / \sqrt{3}}{2 / 3}$
$=-\sqrt{3}$