Equation of the given line is $ \sqrt 3 x+y+2=0$

This equation can also be written as

$-\sqrt 3 x - y=2$ dividing on both sides by 2 we get, $ -\large\frac{\sqrt 3}{2}$$x-\large\frac{1}{2}$$y=1$

comparing this equation with equation (1) we get,

$ \cos \theta = -\large\frac{\sqrt 3}{2}$ and $ \sin \theta = \large\frac{1}{2}$, and $p=1$

Since both $ \cos \theta $ and $ \sin \theta$ are negative, $ \theta = \pi + \large\frac{\pi}{6} $$ = \large\frac{7 \pi}{6}$

Hence the values of $ \theta$ and $p$ are $ \large\frac{7 \pi}{6}$ and 1.