2. Let $x, y$ be real numbers. If for any real numbers $\alpha, \beta$ satisfying $\cos \alpha - \cos \beta \neq 0$, we have
$$
\frac{\sin \left(\alpha+\frac{\pi}{6}\right)+\sin \left(\beta-\frac{\pi}{6}\right)}{\cos \alpha-\cos \beta}=x \cot \frac{\alpha-\beta}{2}+y
$$

then $(x, y)$
2. $\left(-\frac{\sqrt{3}}{2}, \frac{1}{2}\right)$.

Given $\cos \alpha - \cos \beta \neq 0$, we know $\sin \frac{\alpha - \beta}{2} \neq 0$.
Therefore, all involved expressions are meaningful.
For the given equation, take $\alpha = \frac{\pi}{2}, \beta = \frac{\pi}{6}$, we get $-1 = \sqrt{3} x + y$; take $\alpha = -\frac{\pi}{2}, \beta = \frac{\pi}{6}$, we get $1 = -\frac{\sqrt{3}}{3} x + y$.
Solving these, we get $x = -\frac{\sqrt{3}}{2}, y = \frac{1}{2}$.