[step:Compare the cubic intersection polynomial with its roots]
Let $\overline{k}$ denote an algebraic closure of $k$. Define the polynomial $F\in k[x]$ by
\begin{align*}
F(x)=\bigl(m(x-x_1)+y_1\bigr)^2-\bigl(x^3+ax+b\bigr).
\end{align*}
After base change from $k$ to $\overline{k}$, the zeros of $F$ are exactly the $x$-coordinates of the affine intersection points of the line $\ell$ with $E$, counted with intersection multiplicity. The projective closure of this non-vertical line has equation
\begin{align*}
Y=mX+(y_1-mx_1)Z.
\end{align*}
Substituting $O=[0:1:0]$ into this equation gives $1=0$, so the line does not contain $O$. The projective line is not a component of $\overline{E}_{\overline{k}}$: after substitution, the intersection equation is the nonzero cubic polynomial $F(x)$, whose leading term is $-x^3$. Therefore the line-cubic intersection consequence of [Bézout's Theorem](/page/Bezout%27s%20Theorem) applies over $\overline{k}$, and the projective line meets the projective cubic $\overline{E}_{\overline{k}}$ in three points counted with multiplicity. Since the line does not contain $O$, all three intersections are affine. Expanding the leading terms gives
\begin{align*}
F(x)=-x^3+m^2x^2+\text{terms of degree at most }1.
\end{align*}
Over $\overline{k}$, let $\alpha\in\overline{k}$ denote the remaining root of $F$ after the roots contributed by $P$ and $Q$ are counted with their prescribed multiplicities. In the secant case, $x_1$, $x_2$, and $\alpha$ are the three roots of $F$. In the tangent case, $x_1$ occurs with multiplicity two. Indeed, let $F'\in k[x]$ denote the formal derivative of $F$. Since $P=(x_1,y_1)$ lies on $E$, we have $F(x_1)=0$, and differentiating the displayed polynomial gives
\begin{align*}
F'(x)=2m\bigl(m(x-x_1)+y_1\bigr)-(3x^2+a).
\end{align*}
Evaluating at $x_1$ gives
\begin{align*}
F'(x_1)=2my_1-(3x_1^2+a)=0,
\end{align*}
because in the tangent case $m=(3x_1^2+a)/(2y_1)$. Thus the three roots are $x_1$, $x_1$, and $\alpha$. In both cases we may write in $\overline{k}[x]$
\begin{align*}
F(x)=-(x-x_1)(x-x_2)(x-\alpha),
\end{align*}
where in the tangent case $x_2=x_1$. Comparing the coefficient of $x^2$ gives
\begin{align*}
m^2=x_1+x_2+\alpha.
\end{align*}
Hence
\begin{align*}
\alpha=m^2-x_1-x_2.
\end{align*}
Since $m$, $x_1$, and $x_2$ lie in $k$, this equality shows that $\alpha\in k$. Define $x_R=\alpha\in k$ and define $y_R\in k$ by
\begin{align*}
y_R=m(x_R-x_1)+y_1.
\end{align*}
Then $R=(x_R,y_R)$ is the third affine intersection point of $\ell$ with $E$, counted with multiplicity, and
\begin{align*}
x_R=m^2-x_1-x_2.
\end{align*}
[/step]