Given that \( \tan(A + B) = \sqrt{3} \), it follows that:
\[\nA + B = 60^\circ \quad \text{(since \( \tan 60^\circ = \sqrt{3} \))}\n\]
Also, \( \cos(A - B) = \frac{\sqrt{3}}{2} \), which implies:
\[\nA - B = 30^\circ \quad \text{(since \( \cos 30^\circ = \frac{\sqrt{3}}{2} \))}\n\]
Solving the system of equations:
\[\nA + B = 60^\circ\n\]
\[\nA - B = 30^\circ\n\]
Adding the equations:
\[\n2A = 90^\circ \quad \Rightarrow \quad A = 45^\circ\n\]
Substituting \( A = 45^\circ \) into \( A + B = 60^\circ \):
\[\n45^\circ + B = 60^\circ \quad \Rightarrow \quad B = 15^\circ\n\]
Thus, the values of \( A \) and \( B \) are \( 45^\circ \) and \( 15^\circ \).