This is 19.11.11 in Vakil's Foundations of Algebraic Geometry, July 31 2023 version.
Let $E$ be an elliptic curve, $p$ be a non-torsion point, and $\infty$ be the point at infinity. Consider the usual closed immersion $E \rightarrow \mathbb{P}^2_k$, and also the closed immersion given by translation by $p$ then the usual one. Call these $i$ and $j$ respectively.
Then, consider the fiber coproduct $X = \mathbb{P}^2_k \coprod_{E, i, j} \mathbb{P}^2_k$. The claim is that all invertible sheaves on $X$ are trivial.
Let $L$ be an invertible sheaf. Then, its pullbacks to the copies of $ \mathbb{P}^2_k$ are $O(d_1)$ and $O(d_2)$ respectively. $i$ pulls back $O(d_1)$ to $O(3 d_i \infty)$, and $j$ pulls it back to $O(3 d_2 p)$. By $p$ being non-torsion, this is only possible if $d_1 = d_2 = 0$.
Thus $L$ pulls back to the structure sheaf on both copies of $ \mathbb{P}^2_k$. But how do we conclude that $L$ itself is the structure sheaf?
The problem I'm facing is that the two copies of $ \mathbb{P}^2_k$ are not necessarily open in $X$, so I don't know how to use information on $ \mathbb{P}^2_k$ to conclude anything about $X$.