My question reads:
Prove that if the real-valued function $f$ is increasing (or decreasing), then $f$ is one-to-one.
Here is my proof after meeting with my professor.
Let $f:\Bbb{R}\to\Bbb{R}$ be increasing (or decreasing) on $\Bbb{R}$
Let $x_1,x_2 \in \Bbb{R}$ s.t. $x_1 \neq x_2$ then we need to show $f(x_1) \ne f(x_2)$. Then we have two cases, where either $x_1<x_2$ or $x_1>x_2$
Case 1: $x_1 < x_2$
Then $f(x_1)< f(x_2)$ meaning $f$ is increasing
Case 2: $x_1 > x_2$
Then $f(x_1)< f(x_2)$ meaning $f$ is decreasing.
You did not prove why $f(x_1) \ne f(x_2)$.
As you said, fix $x, y \in \mathbb{R}$ and you have two cases, either $x<y$ or $x>y$.
If $f$ is increasing, then in the first case, $f(x) < f(y)$ and in the second case, $f(x) > f(y)$, but either way $f(x) \ne f(y)$.
If $f$ is decreasing, then in the first case, $f(x) > f(y)$ and in the second case, $f(x) < f(y)$, but either way $f(x) \ne f(y)$.
So no matter if $f$ increasing or decreasing, $x \ne y \implies f(x) \ne f(y)$, and so $f$ must be one-to-one.
UPDATE Note this assumes that when you write increasing or decreasing, the intent is strictly increasing or strictly decreasing.