$${\textbf{Step-1: Finding the value of D. }}$$
$${\text{Given,}}$$
$$\Rightarrow(x^2+x+1)dy+(y^2+y+1)dx=0$$
$$\Rightarrow(x^2+x+1)dy=-(y^2+y+1)dx$$
$$\Rightarrow\dfrac{dy}{y^2+y+1}=-\dfrac{dx}{x^2+x+1}$$
$${\text{Integrating both sides}}$$
$$\Rightarrow \int \dfrac{dy}{y^2+y+1}=-\int\dfrac{dx}{x^2+x+1}$$
$${\text{By using perfect square method}}$$
$$\Rightarrow\int\dfrac{dy}{(y+\dfrac{1}{2})^2+(\dfrac{\sqrt3}{2})^2}=-\int\dfrac{dx}{(x+\dfrac{1}{2})^2+(\dfrac{\sqrt3}{2})^2}$$
$$\Rightarrow \int\dfrac{dx}{(x+\dfrac{1}{2})^2+(\dfrac{\sqrt3}{2})^2}+\int\dfrac{dy}{(y+\dfrac{1}{2})^2+(\dfrac{\sqrt3}{2})^2}$$
$${\text{use formula}}$$ $$\int\dfrac{dx}{a^2+x^2}=\dfrac{1}{a}tan^{-1}\dfrac{x}{a}$$
$$\Rightarrow \dfrac{2}{\sqrt3}tan^{-1}[\dfrac{2}{\sqrt3}\times\dfrac{2x+1}{2}]+\dfrac{2}{\sqrt3}tan^{-1}[\dfrac{2}{\sqrt3}\times\dfrac{2y+1}{2}]+\dfrac{2}{\sqrt3} tan^{-1}C=0$$
$${\text{[.... Where C is the integral constant]}}$$
$${\text{use formula}}$$ $$tan^{-1}A+tan^{-1}B$$
$$\Rightarrow\dfrac{2}{\sqrt3}tan^{-1}[\dfrac{\dfrac{2x+1}{3}+\dfrac{2y+1}{\sqrt3}}{1-(\dfrac {2x+1}{\sqrt3})(\dfrac{2y+1}{\sqrt3})}]=-\dfrac{2}{\sqrt3}tan^{-1} C$$
$$\Rightarrow \dfrac{2x+1+2y+1}{\sqrt 3}\times \dfrac{\sqrt3 \sqrt3}{3-4xy-2x-2y-1}=C$$
$$\Rightarrow \dfrac{\sqrt3(2x+2y+2)}{2-4xy-2x-2y}=C$$
$$\therefore \sqrt3\times2(x+y+1)=c\times 2(1-2xy-x-y)$$
$$\therefore (x+y+1)=\dfrac{C}{\sqrt3}(1-x-y-2xy)$$
$${\text{ Compare this equation with the given equation gives,}}$$
$$\therefore D=-2$$
$${\textbf{Hence option C is correct }}$$