Answer
a) $acx+ad+b$
b) $acx+bc+d$
c) $D_{f\circ g}=D_{g\circ f}=(-\infty,\infty)$
d) $d(a-1)=b(c-1)$
Work Step by Step
We are given the functions:
$f(x)=ax+b$
$g(x)=cx+d$
a) Determine $f\circ g$:
$(f\circ g)(x)=f(g(x))=f(cx+d)=a(cx+d)+b=acx+ad+b$
b) Determine $g\circ f$:
$(g\circ f)(x)=g(f(x))=g(ax+b)=c(ax+b)+d=acx+bc+d$
c) As both functions are polynomials, the domain of $f\circ g$ and the domain of $g\circ f$ are the set of all real numbers:
$D_{f\circ g}=D_{g\circ f}=(-\infty,\infty)$
d) The domains of the two functions are the same according to part c). In order for $f\circ g=g\circ f$, we must have:
$(f\circ g)(x)=(g\circ f)(x)$ for any real $x$
$acx+ad+b=acx+bc+d$
Identify coefficients:
$ad+b=bc+d$
$ad-d=bc-b$
$d(a-1)=b(c-1)$