Well, a function is characterized not only by its "formula", but, also, by its domain and codomain.
Roughly, a function is a ordered triple $(X,Y, f) $, in which $ X, Y $ are sets and $ f $ is a law which associates each element $x\in X $ to one element $ f(x)\in Y $.
In this situation, $X$ is called "domain" and $Y$ is called codomain.,
You can see more at: http://en.wikipedia.org/wiki/Function_%28mathematics%29
So, you usually can't say much about a function when you don't have this complete information: the domain, the codomain and the "law".
You cannot say if they are "one-to-one" if you don't know which are the domains of these functions...
Nevertheless, let me say something about your question:
If you consider the domain and codomain being the real line, which I think it's the case. Then the second argument is wrong -
because $x^2 = y^2 $ doesn't imply $ x=y $.
Assuming $ x^2 = y ^2 $, you can only conclude that $ \left| x \right| = \left| y\right| $.
Furthermore, you may conclude that $f(x) = f(-x) $ for all $x$. And you would conclude, therefore, that the function is not one-to-one.
But, if, for instance, your domain was $ \mathbb{R} ^+ $ (that is the set of positive real numbers) then your (second) argument would be right.