7. If the equation $x^{2}-x y-2 y^{2}+x+a=0$ represents two straight lines, then $a=$
7. $\frac{2}{9}$.

Notice that, $x^{2}-x y-2 y^{2}=(x+y)(x-2 y)$.
Let $x^{2}-x y-2 y^{2}+x+a$
$$
=(x+y+m)(x-2 y+2 m) \text {. }
$$

Expanding the right side of the above equation and comparing the coefficients on both sides, we get
$$
\left\{\begin{array} { l } 
{ a = 2 m ^ { 2 } , } \\
{ 3 m = 1 }
\end{array} \Rightarrow \left\{\begin{array}{l}
m=\frac{1}{3}, \\
a=\frac{2}{9} .
\end{array}\right.\right.
$$