## Algebraic Geometry; Rings of Regular Functions

I feel like this question is probably easy, but I'm just missing something obvious. I usually pick things up quickly (especially in algebra) but algebraic geometry continues to give me fits.

We will work over a fixed algebraically closed field $k$.

If $X$ is an affine or quasi-affine variety, denote by $\mathcal{O}(X)$ the ring of regular functions on $X$ (i.e., $f\in\mathcal{O}(X)\Leftrightarrow \forall P\in X,\exists$ an open neighborhood $U_P$ of $P$ such that $f|_U$ is given by a rational function $\frac{g(x,y)}{h(x,y)}\in k(x,y)$.

There are two questions here:

1. Show that $\mathcal{O}(\mathbb{A}^2\setminus\mathcal{Z}(x))=k[x,y][x^{-1}]$ (where $\mathcal{Z}(x)$ denotes the zero set of $x$ which, over $\mathbb{A}^2$, is simply $\mathcal{Z}(x)=\{(0,y)|y\in k\}$).

2. Show that $\mathcal{O}(\mathbb{A}^2\setminus\{(0,0)\})=\mathc al{O}(\mathbb{A}^2)$. (It is already known that $\mathcal{O}(\mathbb{A}^2)=k[x,y]$).

I really feel like I'm just missing something blatantly obvious. I can intuitively believe #1: if we only consider those points where $x$ is nonzero, then $\frac{1}{x}$ is defined everywhere, and obviously a rational function. But to actually PROVE that the given ring is exactly equal to the ring of regular functions on the set where $x\neq 0$ is a tougher matter... I think...

Any help would be appreciated. I really, really like this subject, but I'm having so much trouble understanding it fully, or at least to the point where I can competently work with it...