In Harsthone page 15, the notion of regular function of a quasi affine variety $Y$ is defined as followds.
A function $f:Y \to k$ is regular at a point $P \in Y$ if there is an open neighborhood $U$ with $p \in U \subset Y$ and polynomial $g,h \in A = k [x_1,...,x_n]$, such that $h$ is nowhere zero on $U$ and $f=g/h$ on $U$. We say that $f$ is regular on $Y$ if it is regular at every point of $Y$. We denote by $\mathcal{O}(Y)$ the ring of all regular functions on $Y$.
On the other hand,
in the page 17, THEOREM 3.3 in the book said that
$\mathcal{O}(Y)$ is isomorphic to the affine coordinate ring of $Y$,
$\mathcal{O}(Y)\cong A(Y)=k[x_1,...,x_n]/I(Y)$.
But I cannot understand it. Because any element of $A(Y)$ can be represented by the polynomial and not its ratio. So why is $\mathcal{O}(Y)$ defined by using ratio $g/h$ of polynomials $g,h$?