We are given that \( \tan(A + B) = \sqrt{3} \), which implies:
\[
A + B = 60^\circ \quad \text{(since \( \tan 60^\circ = \sqrt{3} \))}
\]
Also, \( \cos(A - B) = \frac{\sqrt{3}}{2} \), which implies:
\[
A - B = 30^\circ \quad \text{(since \( \cos 30^\circ = \frac{\sqrt{3}}{2} \))}
\]
Now, solving the system of equations:
\[
A + B = 60^\circ
\]
\[
A - B = 30^\circ
\]
Adding these two equations:
\[
2A = 90^\circ \quad \Rightarrow \quad A = 45^\circ
\]
Substituting \( A = 45^\circ \) into \( A + B = 60^\circ \):
\[
45^\circ + B = 60^\circ \quad \Rightarrow \quad B = 15^\circ
\]
Therefore, the values of \( A \) and \( B \) are \( 45^\circ \) and \( 15^\circ \).