I'm trying to prove that the affine line with double origin is not an affine scheme.
Consider $X_1:=\text{Spec}(k[x])$ and the open subset $U_1:=X_1\setminus\{(x)\}$. In particular $\mathcal{O}_{X_1}(U_1)=k[x]_x$.
Similarly, $X_2:=\text{Spec}(k[y])$, $U_2:=X_2\setminus\{(y)\}$, so that $\mathcal{O}_{X_2}(U_2)=k[y]_y$.
The ring isomorphism $k[x]_x\to k[y]_y$ induces an isomorphism $\varphi:U_1\stackrel{\sim}{\to} U_2$. We define the line with double origin as the scheme $$X=X_1\sqcup_\varphi X_2,$$ i.e. the gluing of $X_1$ and $X_2$ along $U_1\simeq U_2$ via $\varphi$.
Here is my strategy: if we remove one of the origins from $X$, say $(x)$, we get the usual line $\text{Spec}(k[y])$, whose set of global sections is $k[y]$. On the other hand, if $X$ is affine, i.e. $X\simeq \text{Spec}(A)$ for some ring $A$, then the closed point $(x)$ corresponds to a maximal ideal $\mathfrak{m}\subset A$. Hence the removal of $(x)$ gives the scheme $\text{Spec}(A)\setminus\{\mathfrak{m}\}$, which should look like a line without an origin.
I hope that I can prove that $\mathcal{O}_{\text{Spec}(A)}(\text{Spec}(A)\setminus\{\mathfrak{m}\})\not\simeq k[y]$, but I don't know how to do it.