The equation of a parabola with directrix $ lx + my + n = 0 $ and focus $ P(x_P, y_P) $ is $$ \frac{(lx + my + n)^2}{l^2 + m^2} = (x - x_P)^2 + (y - y_P)^2 $$ What is the equation of a line tangent to this parabola?
I have tried many things like solving the equation for $ y $ and then differentiating with respect to $ x $ but I cannot manage to find an equation for a tangent.
You can differentiate the equation of the parabola implicitly (imagine that $y=y(x)$, and differentiate both sides of the equation normally). Solving $y'(x)=dy/dx$ from the resulting equation gives the following beauty $$ \frac{dy}{dx}=\frac{m^2x-\ell m y-\ell n-(m^2+\ell^2) x_P} {(\ell^2+m^2) y_P-\ell^2 y+\ell m x+m n}. $$
If you are given a point $P_0=(x_0,y_0)$ on your parabola, you can then plug in the values $x\leftarrow x_0$, $y\leftarrow y_0$ into this formula, and calculate the slope $k_0$ of the tangent at $P_0$: $$ k_0=\frac{m^2x_0-\ell m y_0-\ell n-(m^2+\ell^2) x_P} {(\ell^2+m^2) y_P-\ell^2 y_0+\ell m x_0+m n}. $$ The equation of the tangent is then the usual $$ y-y_0=k_0(x-x_0). $$ Warning: Because the parabola is tilted, it may happen that at some point the tangent will be vertical. You can diagnose this by seeing that the denominator in the formula for $k_0$ vanishes.