The simplest approach is to solve for the intersection points of the line and parabola and then force the value of k to be such that there's only one intersection point:

.... (1)

.... (2)

Start solving equations (1) and (2) simultaneously:

.

There will be only one solution (and hence will be a tangent to ) if the discriminant of this quadratic is equal to zero: