First, you can write the equation in this way
\left[ \begin{array}{cc}
x & y
\end{array} \right]
\cdot
\left[ \begin{array}{cc}
1 & 2 \\
2 & 1
\end{array} \right]
\cdot
\left[ \begin{array}{c}
x \\ y
\end{array} \right] = 12
Now, you have to diagonalize the symmetric matrix...