Prove elements generate a free group
This proof uses covering spaces, but I'm posting it at the request of orlandpm (the OP).
Consider the $2$-oriented graph, $G$:
This space is the wedge sum of two circles. Therefore its fundamental group is the free group on two generators $\langle x, y\rangle$.
This space has the following covering space, $\widetilde G$:
Since the map $p_* : \pi_1(\widetilde G) \to \pi_1(G)$ induced by the covering space $p : \widetilde G \to G$ is injective, it follows that the fundamental group of $\widetilde G$ is isomorphic to $\langle x^2, xy, y^2\rangle$.
At the same time, $\widetilde G$ is homotopy equivalent to the wedge sum of three circles. Therefore its fundamental group is the free group on three generators, $F_3$.
We conclude that $$ \langle x^2, xy, y^2\rangle \cong F_3. $$
For the theory behind this, check out section $1.3$ of Hatcher's Algebraic Topology book (available freely online). (Images courtesy of the book.)
Although you can do this by bare hands, it is easier to do it after learning a bit of general theory about subgroups of free groups. These three elements generate the subgroup of the free group $F$ on $\{x,y\}$ consisting of words of even length, which clearly has index $2$ in $F$ with transversal $\{1,x\}$. The Schreier generators of the subgroup with respect to this transversal are $x^2,xy,yx^{-1}$, which are known to generate it freely. We can then replace $yx^{-1}$ by $(yx^{-1})(xy)=y^2$ to deduce that the given three elements are free generators.
You can also use the Nielsen theory to transform any set of elements to a set that freely generates the subgroup it generates. In this case, $x^2,xy,y^2$ is not Nielsen reduce, because $l(y^2(xy)^{-1}x^2) = l(yx)=2 \le l(y^2)+l(x^2)-l(xy)$, but again replacing $y^2$ by $y^{-1}x$ results in a Nielsen reduced set.
Here is a “bare-hands” approach.
Let $X$ be your group generated by $x^2,y^2$ and $xy$, $A$ be the free group on three generators $a_1,a_2,a_3$. There is a unique group homomorphism $f: A \to X$, sending $a_1$ to $x^2$, $a_2$ to $y^2$, $a_3$ to $xy$. That homomorphism is obviously surjective. So all you need to show is that $f$ is injective, i.e. $f(a)\neq e$ whenever $a\neq e$.
In both $X$ and $A$, every element has a unique reduced writing (i.e. expression not containing terms of the form $tt^{-1}$ or $t^{-1}t$). This allows us to identify each element with a unique word, called its “normal form”, and saying that an element ends with a certain word.
Let $a\in A,a\neq e$. Then $a$ must end with something, there are six cases, and I claim that
(1) If $a$ ends with $a_1$ (in $A$), then $f(a)$ ends with one of $x^2,yx,y^{-1}x,y^2$ (in $X$).
(2) If $a$ ends with $a_2$ (in $A$), then $f(a)$ ends with $y^2$ (in $X$).
(3) If $a$ ends with $a_3$ (in $A$), then $f(a)$ ends with one of $xy,x^{-1}y$ (in $X$).
(4) If $a$ ends with $a_1^{-1}$ (in $A$), then $f(a)$ ends with $(x^{-1})^2$ (in $X$).
(5) If $a$ ends with $a_2^{-1}$ (in $A$), then $f(a)$ ends with one of $xy^{-1},x^{-1}y^{-1},(y^{-1})^2$ (in $X$).
(6) If $a$ ends with $a_3^{-1}$ (in $A$), then $f(a)$ ends with one of $yx^{-1},y^{-1}x^{-1}$ (in $X$).
Once this property is stated, its verification by induction on the length of $a$ and by case disjunction is purely mechanical. I can supply further details if you need them.
So we have by this disjunction in six cases, that $f(a)\neq e$ : $f$ is injective, which concludes the proof.