Let $a,b\in \mathbb{R}$ such that $a<b$. Let $f:(a,b)\to\mathbb{R}$ be monotonically increasing ($\leq$-wise).
Let $x_0\in (a,b)$. $f$ is continuous on $(a,b)\setminus\{x_0\}$. At $x_0$, $f$ is continuous from the right, but not from the left. Show that $\operatorname{Im} f$ is a union of two disjoint intervals.
Attempt
$f$ is continuous on $[x_0,b)$ so the image is an interval $I$.
$f$ is continuous on $(a,x_0)$ so the image is an interval $J$.
Suppose there exists some $x_1\in (a,b)$ such that $f(x_1)\in I\cap J$ $\iff$$\big((x_1\in[x_0,b)\implies f(x_1)\in I)\wedge(x_1\in(a,x_0)\implies f(x_1)\in J)\big)$
From the fact that $\forall y\in(a,x_0)\forall z\in[x_0,b):y<z$ and monotonicity of $f$ we get $f(x_1)\leq f(x_1)$.
Comment
I'm not sure about my logical implications.
Your arguments are correct. A simpler proof:
Since $f$ is continuous on $(a,x_0)$ and $f$ is increasing, we have, by the intermediate value theorem,
$f((a,x_0)))=(f(a),f(x_0))$.
Since $f$ is continuous on $(x_0,b)$ , $f$ is continuous from the right at $x_0$ and $f$ is increasing, we have, by the intermediate value theorem,
$f([x_0,b))=[f(x_0),f(b))$.
Conclusion: $Im f= (f(a),f(x_0)) \cup [f(x_0),f(b))$.