I'm doing some exercise in which I need to prove that every morphism of prevarieties (As in Gathmann's, in fact it's an exercise from Gathmann's notes) $\mathbb{A}^1-0\to \mathbb{P}^1$ can be extended to a morphism $\mathbb{A}^1\to \mathbb{P}^1$.
My attempt started by taking the open cover $$U_0=\{[x:y]\mid x\neq 0\},U_1=\{[x:y]\mid y\neq 0\}\subseteq \mathbb{P}^1.$$ Then, from what I have done, it seems that a morphism $f:\mathbb{A}^1-0\to \mathbb{P}^1$ is just a map such that $f|_{f^{-1}(U_i)}:f^{-1}(U_i)\to U_i$ is a morphism of affine varieties, thus, after replacing $U_0,U_1\cong \mathbb{A}^1$ by a very simple map and $\mathbb{A}^1-0$ by $V(xy-1)\subseteq \mathbb{A}^2$ the induced maps must be polynomials.
I think up to the part in italic, I'm in the right track (but I think it's just the beginning). I'm not sure the part in italic can really help.
Now what I think follows is, consider the morphism $f:\mathbb{A}^1-0\to \mathbb{P}^1$. Then we consider the two restrictions $f_0:V_0\to U_0$, $f_1:V_1\to U_1$. I want to use this information to find some place to send $0$, but I'm not sure how I should do that.
I found a question about a map $\mathbb{A}^2-0\to \mathbb{P}^1$ which cannot be extended, and I see what fails there, but I'm not sure if I can use that as an idea to find the value of $f(0)$. It'd be more like that if I find the appropiate value for $f(0)$ then that might help me prove continuity. In a comment a suggestion for my exercise is given but I'm not sure it fits the way I'm trying to do it.
So, is there any idea about how can I continue with my attempt? If not, is there any idea about how can the attempt in that comment continue? Or an idea about a better approach for it?
For (a), I think the idea should be (I'm being very loose, but this works in general) to factor. In the sense that if $t$ is a coordinate on $\mathbb{A}^1$ then near $0$ your map looks something like $t↦[t^2+t,t^3−t^2]$. As it stands this formula does not determine a map at $0$. But away from $0$ it's the same as $[t+1,t^2−t]$, and that formula does say something at $0$.