4. If there exist real numbers $a, x, y$, such that the equation $x \sqrt{a(x-a)}+y \sqrt{a(y-a)}=$ $\sqrt{\lg (x-a)-\lg (a-y)}$ holds. Then the value of $\frac{3 x^{2}+x y-y^{2}}{x^{2}-x y+y^{2}}$ is ().
A. 3
B. $1 / 3$
C. 2
D. $7 / 1996$
4. B From $x-a>0, a-y>0$ and $a(x-a) \geqslant 0, a(y-a) \geqslant 0$, we get $a=0$. Substituting $a=0$ into the original equation, we get $x=-y>0$.