\(f\left(x_1\right)=g\left(x_1\right)\Leftrightarrow ax_1+b=cx_1+d\Leftrightarrow\left(a-c\right)x_1=d-b\) (1)
\(f\left(x_2\right)=g\left(x_2\right)\Leftrightarrow ax_2+b=cx_2+d\Leftrightarrow\left(a-c\right)x_2=d-b\)
\(\Rightarrow\left(a-c\right)x_1=\left(a-c\right)x_2\)
\(\Leftrightarrow a-c=0\) (do \(x_1\ne x_2\))
\(\Leftrightarrow a=c\)
Thế vào (1) \(\Rightarrow0.x_1=d-b\Rightarrow d=b\)
\(\Rightarrow\left\{{}\begin{matrix}a=c\\b=d\end{matrix}\right.\) \(\Rightarrow f\left(x\right)=g\left(x\right)=ax+b\) với mọi x