I just started to learn how to do proofs, and I'm trying to solve this exercise, I have to do it by direct proof and by contradiction. The proof of my book is:
Direct proof:
Let $x,y \in \mathbb{R}^+$ such that $x \leq y$. Multiplying both sides by $x$ and $y$ respectively, we obtain $x^2 \leq xy$ and $xy \leq y^2$. Therefore $x^2 \leq xy \leq y^2$ and so $x^2 \leq y^2$
Proof by contradiction
Assume, to the contrary, that there exist positive numbers $x$ and $y$ such that $x \leq y$ and $x^2>y^2$. Since $x \leq y$, it follows that $x^2 \leq xy$ and $xy \leq y^2$. Thus, $x^2 \leq y^2$ producing a contradiction.
My proofs are not like this though, I did them in this way:
Direct proof:
Let $x,y \in \mathbb{R}^+$ such that $x \leq y$. Then $(x-y)(x+y)\leq0$, which means that $x^2-y^2\leq0$, and therefore $x^2 \leq y^2$
Proof by contradiction (exact same thing):
Assume $x\leq y$ and $x^2>y^2$. Then $(x-y)(x+y)\leq0$, which means $x^2-y^2 \leq0$. Therefore $x^2\leq y^2$ producing a contradiction.
Do my proofs make sense even though I did them differently from the book?