The two functions $f_1(x)= 1$ and $f_2(x)=e^x$ for themselves would be continuous. Then the function obtained by "mixing" them like in this problem is continuous exactly at those points $x$ where $f_1(x)=f_2(x)$ holds.
To see this, consider $x_0$ with $f_1(x_0)\ne f_2(x_0)$. Let $\epsilon = \frac12 |f_1(x_0)-f_2(x_0)|$. If $x_0$ is rational, you find irrational points $x$ arbitrarily close to $x_0$ such that $|f_2(x)-f_2(x_0)|<\epsilon$, hence $|f(x)-f(x_0)|=|f_2(x)-f_1(x_0)|\ge |f_2(x_0)-f_1(x_0)|-|f_2(x)-f_2(x_0)|=\epsilon$, i.e. $f$ is not continuous at $x_0$. The sam works with rational and irrational interchanged if $x_0$ is irrational.
On the other hand, if $f_1(x_0)=f_2(x_0)$, then for any $\epsilon>0$ there exists $\delta_1>0$ with $|f_1(x)-f_1(x_0)|<\epsilon$ if $|x-x_0|<\delta_1$ and $\delta_2>0$ with $|f_2(x)-f_2(x_0)|<\epsilon$ if $|x-x_0|<\delta_2$. Then with $\delta:=\min\{\delta_1,\delta_2\}$ we have $|f(x)-f(x_0)|<\epsilon$ if $|x-x_0|<\delta$.