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.)

 A: The quadratic expression describes a conic, and the symmetric matrix associated to the conic is:
$A=\begin{bmatrix}
9 & -3/2  & 15/2\\ 
-3/2 & a  & -8 \\ 
15/2 & -8 & -14 
\end{bmatrix}$
If the rank of the matrix $A$ is not equal to $3$ (which means that its determinant is equal to $0$), then the quadratic form describes a degenerate conic: the union of two distinct lines (which could also be, for example, two conjugate complex lines) or a double line.
We have that: $det(A)=\frac{-729}{4}a-\frac{729}{2}$. So $A$ is singular if and only if $a=-2$. In fact $9x^2-3xy-2y^2+15x-16y-14=0$ describes two incident lines in the affine real plane.
A: $$a y^2+9 x^2-3 x y+15 x-16 y-14=0$$
collect $x$
$$9 x^2+x (15-3 y)+ay^2-16 y-14=0$$
discriminant is
$$\Delta=(15-3y)^2-4\cdot 9(a y^2-16y-14)=9(y^2-4 a y^2+54 y+81)$$
In order to  give the equation of straight lines, $\Delta$ must be  a perfect square:
$$y^2-4 a y^2+54 y+81=(3y+9)^2\text{ if } a=-2$$
the solutions are
$$x=\frac{-(15-3y)\pm 3(3y+9)}{18}$$
that is
$$x=\frac{2 (y+1)}{3};\;x=\frac{1}{3} (-y-7)$$
and finally
$$3 x-2 y-2=0;\;3 x+y+7=0$$
A: $$9x^2+(15-3y)x+ay^2-16y-14=0$$
$$\Delta = (15-3y)^2-36(ay^2-16y-14)=(9-36a)y^2+486y+729$$
Can you end it now?
A: 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
$$
