(l/-n)x + (m/-n)y = 1
equation of a tangent: xx<sub>1</sub>/a<sup>2</sup> + yy<sub>1</sub>/b<sup>2</sup> = 1
therefore if the line touches, it is at least a tangent to the ellipse, (l/-n) = x<sub>1</sub>/a<sup>2</sup>, and (m/-n) = y<sub>1</sub>/b<sup>2</sup>.
now substitute l and m...