Let $X \subseteq \mathbb{A}^2$ be the circle of equation $x^2+y^2=1$. I have to compute the points of $X$ such that $f=\frac{1-y}{x}$ is regular. (We can suppose $\operatorname{char}(K)\neq 2$)
I computed them in two different way and I found two different results. So I’m a bit confused.
In any case $f$ is regular when $x \neq 0$.
First way: In $X$ we have $$\frac{1-y}{x}=\frac{x(1-y)}{x^2}=\frac{x(1-y)}{1-y^2}=\frac{x}{1+y}$$ and so it is enough $y\neq 0$. So $X\setminus{(0,-1)}$.
Second way: The set that we are looking for is $$Y=X\setminus(V(x^2+y^2-1)\cap V(x))=X\setminus(V(x,x^2+y^2-1))=X \setminus \{(0,\pm 1)\}$$
The second way looks more intuitive and clear, but I’m a bit confused and any help (for this type of situation) is very useful.
The idea of $f$ being a regular function is that in its domain $f$ is well defined. So, in the first way, at the time of simplifying $1-y$, you are losing information, more precisely, you are missing the point (0,1). In the second way you found all the points that you wanted, but I don't think it's clear how you got them.