Say you are given $f(x) = 5x^2$ and you want to find a tangent line to $f$ that goes through $P(0|-10)$.
The two options you have is using the tangent line equation, $t(x) = f'(a) \cdot (x - a) + f(a)$ and the point slope form, $t(x_1) - t(x_2) = m(x_1 - x_2)$.
Both lead to $$t(x) = 10\sqrt{2}x - 10$$ and $$t(x) = -10\sqrt{2}x - 10$$ after setting $t(0) = -10$.
Now, is there a way to find these by using $t(x) = mx + k$? You could use that without any problems if the point was on the graph of f, but here, it seems like you will have: $$t(x) = mx + k$$ now $m$ = $f'(a)$ where $a$ is the x-coordinate of the point that touches $f$ $$t(x) = 10ax + k$$ $$t(0) = -10 \implies k = -10$$ $$\implies t(x) = 10ax - 10$$
From here on, we would need to find $a$, but we can't set $t(0) = -10$ again because that would just give a true statement.
So it seems like you can't use $t(x) = mx + k$ here.
Q: Now, how to notice when you can use $t(x) = mx + k$ and when you cannot, without having to try?
Is the case where the point isn't on the graph of $f$ an exception and you can use $t(x) = mx + k$ everywhere else?
If a tangent line $t(x) = mx + k$ to the graph of the function $f(x) = 5x^2$ passes through the point $(0, -10)$, then it must also pass through the point $(x, 5x^2)$. Hence, $$5x^2 = mx - 10$$ which can be expressed as the quadratic equation $$5x^2 - mx + 10 = 0$$ If a line is tangent to a curve, then it intersects the curve at a single point in a neighborhood of the point of tangency, which occurs when the discriminant $\Delta = b^2 - 4ac$ is equal to zero. \begin{align*} \Delta & = 0\\ (-m)^2 - 4(5)(10) & = 0\\ m^2 - 200 & = 0\\ m^2 & = 200\\ |m| & = \sqrt{200}\\ |m| & = 10\sqrt{2} \end{align*} Hence, $m = 10\sqrt{2}$ or $m = -10\sqrt{2}$. Thus, the two tangent lines to the curve $f(x) = 5x^2$ that pass through the point $(0, -10)$ are $y = 10\sqrt{2}x - 10$ and $y = -10\sqrt{2}x - 10$.