Not elegant at all!
Squaring & adding $$\dfrac{x^2+y^2+2xy\sin6\theta}{a^2}= \cos^2\theta+\cos^2\left(\theta+\dfrac\pi6\right) =1+\cos\dfrac\pi6\cos\left(2\theta+\dfrac\pi6\right)\ \ \ \ (1)$$
using Prove that $\cos (A + B)\cos (A - B) = {\cos ^2}A - {\sin ^2}B$
Adding & squaring $$\dfrac{(x+y)^2(1+\sin6\theta)}{a^2}= \left[\cos\theta+\cos\left(\theta+\dfrac\pi6\right)\right]^2=\left(1+\cos\dfrac\pi6\right)\left(1+\cos\left(2\theta+\dfrac\pi6\right)\right)\ \ \ \ (2)$$
using Prosthaphaeresis Formula $\cos C+\cos D$ and Double angle formula
Set $2\theta+\dfrac\pi6=t,6\theta=3t-\dfrac\pi2$
From $(1),$ $$\dfrac{x^2+y^2-2xy\cos3t}{a^2}=1+\cos\dfrac\pi6\cos t\ \ \ \ (3)$$
From $(2),$ $$\dfrac{(x+y)^2(1-\cos3t)}{a^2}=\left(1+\cos\dfrac\pi6\right)\left(1+\cos t\right)\ \ \ \ (4)$$
Solve $(3),(4)$ for $\cos t,\cos3t$
and use $\cos3t=4\cos^3t-3\cos t$ to eliminate $t$