Answer
See below
Work Step by Step
Given: $f_1(x)=x$
$f_2(x)=x$ if $x\ne0$
$f_2(x)=1$ if $x =0$
Let $a,b$ be scalars such that
$af_1(x)+bf_2(x)=0 \forall x \in (-\infty, \infty)$
If we assume $x=1$ then $a+b=0$
if $x=0 \rightarrow b=0$
Hence, the linear combination of $f_1$ and $f_2$ is trivial and $f_1,f_2$ are also linearly independent on $(-\infty, \infty)$