$$
\text { 17. (10 points) In } \triangle A B C \text {, } \angle A, \angle B, \angle C
$$

are opposite to the sides $a, b, c$ respectively,
$$
\tan C=\frac{\sin A+\sin B}{\cos A+\cos B}, \sin (B-A)=\cos C .
$$
(1) Find $\angle A, \angle C$;
(2) If $S_{\triangle A B C}=3+\sqrt{3}$, find $a, c$.
$$
17. (1) Notice,
$$
\begin{array}{l}
\tan C=\frac{\sin A+\sin B}{\cos A+\cos B} \\
\Rightarrow \frac{\sin C}{\cos C}=\frac{\sin A+\sin B}{\cos A+\cos B} \\
\Rightarrow \sin C \cdot \cos A-\cos C \cdot \sin A \\
\quad=\cos C \cdot \sin B-\sin C \cdot \cos B \\
\Rightarrow \sin (C-A)=\sin (B-C) \\
\Rightarrow \angle C-\angle A=\angle B-\angle C \text { or } \\
\Rightarrow \angle C-\angle A=\pi-(\angle B-\angle C) \text { (not valid) } \\
\Rightarrow \angle C=\angle A+\angle B \\
\Rightarrow \angle C=\frac{\pi}{3} \Rightarrow \angle B+\angle A=\frac{2 \pi}{3} .
\end{array}
$$

Also, $\sin (B-A)=\cos C=\frac{1}{2}$, then $\angle B-\angle A=\frac{\pi}{6}$ or $\frac{5 \pi}{6}$ (discard) $\Rightarrow \angle A=\frac{\pi}{4}, \angle B=\frac{5 \pi}{12} \Rightarrow \angle C=\frac{\pi}{3}$.
(2) It is easy to know,
$S_{\triangle A B C}=\frac{1}{2} a c \sin B=\frac{\sqrt{6}+\sqrt{2}}{8} a c=3+\sqrt{3}$.
Also, $\frac{a}{\sin A}=\frac{c}{\sin C}$, then
$$
\frac{a}{\frac{\sqrt{2}}{2}}=\frac{c}{\frac{\sqrt{3}}{2}} \Rightarrow a=2 \sqrt{2}, c=2 \sqrt{3} .
$$