Continuous map and irrational numbers

Looks good! As a side note, as you asked for alternative methods, you do not have to formulate the proof by contradiction. Note that the image of $f$ is $$ f(\mathbb{R})=f(\mathbb{R}\setminus\mathbb{Q}\cup\mathbb{Q})=f(\mathbb{R}\setminus\mathbb{Q})\cup f(\mathbb{Q})=A\cup \{f(q_n):n\geq1\} $$ Where $A\subset \mathbb{Q}$ and $q_n$ is an enumeration of the rationals. Thus $f(\mathbb{R})$ is countable, and a continuous map with a countable image is constant.