Find $a$ so a quadratic expression describes a straight line (problem from a Swedish 12th grade ’Student Exam’ from 1931) 
$x$ and $y$ are coordinates in an orthogonal coordinate system. If the constant $a$ is suitably chosen the equation
$$9x^2-3xy+ay^2+15x-16y-14=0$$
describe two straigth lines. Find the value of $a$ and the equations for the two lines.

I tried to complete the square (using Mathematica) but the resulting expression was not helpful’. Any idea where to start? TIA.
(N.B.: The problem is quoted from a Swedish 12th grade ’Student Exam’ from 1931. I find these problems rather fun to solve in the evenings.)


You can solve it by polynomial coefficient identification by doing
$$
(a_1 x+b_1 y + c_1)(a_2 x+b_2 y+c_2)=9 x^2 - 3 x y + a y^2 + 15 x - 16 y - 14
$$
resulting in
$$
\left\{
\begin{array}{l}
 a_1 a_2-9=0 \\
 a_1 b_2+a_2 b_1+3=0 \\
 a_1 c_2+a_2 c_1-15=0 \\
 b_1 b_2-a=0 \\
 b_1 c_2+b_2 c_1+16=0 \\
 c_1 c_2+14=0 \\
\end{array}
\right.
$$
solving for $a_1, b_1, c_1, a_2, b_2, a$ we get
$$
\left(3x+y+7\right)\left(3x-2y-2\right)c_2^2 = 0
$$
