(d)
Let $\phi(x) = f(x) - g(x)$
$= \left\{ \begin{array}{r}
x,\ x \in \mathcal{Q} \\
- x,\ x \notin \mathcal{Q}
\end{array} \right.\$
For one-one
Take any straight line parallel to x-axis which will intersect $\phi(x)$ only at one point.
$\Rightarrow \phi(x)$ is one-one.
Foe onto
As, $\phi(x) = \left\{ \begin{array}{r}
x,\ x \in \mathcal{Q} \\
- x,\ x \notin \mathcal{Q}
\end{array} \right.\$, which shows
$y = x$ and $y = - x$ for irrational values $\Rightarrow y \notin$ real numbers.
$\therefore$ Range=Codomain
$\Rightarrow \ \ \ \phi(x)$ is onto.
Thus, $f - g$ is one-one and onto.